How simple would this be?

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 15, 2011   (RSS)

Re: [willydoit] How simple would this be?

By Jason - November 15, 2011

Hi,

The header code (ie, the code that connects to CMS Builder) will be the same for any page, either a list or a detail page. So you won't have any trouble there.

The best approach would be to do two getRecords queries: 1 to get the detail record (you probably already have this on your page) and 1 to get a list of all the blog records (this will be used to make your list).

For example:

//get blog detail page
list($blogRecord, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
'where' => whereRecordNumberInUrl(1),
'limit' => 1,

));

$blog = @$blogRecord[0]; //get first record

// get list of all blog records
list($allBlogRecords, $allBlogMetaData) = getRecords(array(
'tableName' => 'blog',
'allowSearch' => false,
));


Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/