Go Back   Mosets Community > Archives > Mosets Hot Property 1.0 > Hot Property 1.0 Tips and Tricks

 
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-16-2010, 05:11 PM
jeanpaulbraud jeanpaulbraud is offline
Mosets'd
 
Join Date: Jan 2009
Posts: 16
Default Frontpage layout based on extrafield

I have created a checkbox type extrafield in HP 1.0b5, with two options: Rent and Sale.
I would like a menu item that leads to HP Frontpage layout but showing only properties for 'Rent' and another menu item that leads to the same Frontpage layout, but showing only properties for 'Sale'.

I have looked into components/com_hotproperty/views/home/view.html.php in displayDefault() function. I think here I need to modify the code to add my extrafield in the query criteria. But I didn't succeed...

Please help me with this, if you understand better the code, where and what should I add/change?

Thank you very much
  #2  
Old 09-16-2010, 06:35 PM
gray gray is offline
Mosets'd
 
Join Date: Apr 2006
Posts: 901
Default

Extrafields are extracted in view.html.php by
PHP Code:
            $this->setModel($hotproperty->getModel('Field'));
            
$extrafields $this->get('data''Field', array('all', array(
                
'where' => array(
                    
'Field.name NOT IN'  => array('name''full_text'), // Disable 'name', 'full_text'
                    
'Field.published' => 1,
                    
'Field.hidden' => 0,
                    
'Field.featured' => 1
                
),    
                
'order' => array('Field.ordering' => 'ASC')
            )));
            
$this->assignRef('extrafields'$extrafields); 
in the template \components\com_hotproperty\views\home\tmpl\defaul t.php they are not listed (but of cause could be used). Still new template file have to be created and it's easier to use "type" field for displaying separately "for sale" & "for rent" properties.
__________________
4HP: Slideshow Module New!
www.topcomhomes.com
 

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
Edit frontpage layout larskolmos Hot Property 1.0 Tips and Tricks 2 11-30-2009 02:17 AM
FrontPage Layout issues - need help! stormfire Discussions, Troubleshooting and Problems 2 11-19-2009 09:02 AM
Help with Frontpage layout - I need Forum Love jeremyreger Discussions, Troubleshooting and Problems 2 01-05-2009 10:37 AM


All times are GMT +8. The time now is 07:34 AM.

Copyright © 2005-2010 Mosets Consulting

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