Display "featured" info on every "detail" page?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 2, 2009   (RSS)

Re: [dwelling] Display "featured" info on every "detail" page?

By ross - April 1, 2009

Hi Jeremy

There should be an elegant way to get this going. What you'll want to do is create another simple file and set that one up to display your featured member. It would be a list page with:

'where' => 'featured = 1'

or something like that. It might be a bit different depending on how you have the featured option setup in your system.

Once you get that going, you can just include this file onto your members page.

Let me know if this makes sense :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Display "featured" info on every "detail" page?

By dwellingproductions - April 2, 2009 - edited: April 2, 2009

Ross,

Thanks! Worked like a charm! I hadn't thought about "including" a different page. That trick is going to come in really handy. :-)

For anyone else that may need to know this in the future, I'll post the code I ended up using:

----------------------------------------------------------------------------------------------------

1. On the new "featured" page (in the PHP section before the "head" tags):

list($membersRecords, $membersMetaData) = getRecords(array(
'tableName' => 'members',
'limit' => '1',
'orderBy' => 'featured',
'allowSearch' => '0',
'where' => 'featured = 1',
));



2. On the page the "featured" page was going to be displayed on, I put the following code where I wanted the content from the other page to appear:

<?php include 'featuredMember.php'; ?>

----------------------------------------------------------------------------------------------------



Thanks again Ross!

Jeremy
---------------------------

Dwelling Productions

www.dwellingproductions.com