
Jason
Staff
/ Moderator

Nov 15, 2011, 9:50 AM
Post #2 of 2
(222 views)
Shortcut
|
|
Re: [willydoit] How simple would this be?
[In reply to]
|
Can't Post
|
|
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 - Programmer interactivetools.com Hire me! Save time by getting our experts to help with your project. http://www.interactivetools.com/consulting/
|