Go Back   Mosets Community > Archives > Mosets Hot Property 1.0 > Discussions, Troubleshooting and Problems

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 02-12-2010, 05:16 PM
dknight dknight is offline
Mosets Team - Lead Developer
Join Date: Dec 2004
Posts: 26,272
Lightbulb How to: Access individual fields in property page

It's often useful to be able to access individual field's data in property page for customization. Here's a quick how to to achieve this.

Place this code near the top of this file - /components/com_hotproperty/views/properties/tmpl/property.php:
PHP Code:
    <?php foreach ($this->extrafields as $extrafield) : 
        foreach (
$this->row->PropertyField as $pf) : 
$extrafield->id == $pf->field ) :
$fields->{$extrafield->name} = $pf->value;
This will store all extra fields in $fields variable. Once you have that snippet in property.php view, you can call any extra field value by using the following:
PHP Code:

<?php echo $fields>extrafieldname?>
To do this in summary level (where you view a list of properties for example), use the following codes at /components/com_hotproperty/views/properties/tmpl/_summary.php
PHP Code:
foreach ($this->extrafields as $extrafield) :  
        if( isset(
$this->property->PropertyField) ) :
            foreach (
$this->property->PropertyField as $pf) :  
$extrafield->id == $pf->field ) : 
$fields->{$extrafield->name} = $pf->value
Lead Developer
Mosets.com - Quality Joomla! Solutions

Last edited by dknight; 04-13-2010 at 07:12 PM.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help w/XMLThumb Gallery on Property Detail Page timothypsoulen Discussions, Troubleshooting and Problems 5 04-14-2009 11:53 PM

All times are GMT +8. The time now is 02:48 AM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.