Blended List View from Multiple Sections
7 posts by 4 authors in: Forums > CMS Builder
Last Post: August 12, 2009 (RSS)
By zip222 - August 11, 2009
Re: [jdancisin] Blended List View from Multiple Sections
Actually, its fairly simple. Create your 3 sections in CMSB, then generate the code for the first one. Paste the "Step 1" code at the top of your php file (example 1):
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
require_once "/your/home/directory/cmsbuilder/lib/viewer_functions.php";
list($ipac_articlesRecords, $ipac_articlesMetaData) = getRecords(array(
'tableName' => 'ipac_articles',
'perPage' => '3',
));
?>
Generate the code for the second section and paste only the actual record definition. Do the same for the third (Example 2):
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
require_once "/your/home/directory/cmsbuilder/lib/viewer_functions.php";
list($ipac_articlesRecords, $ipac_articlesMetaData) = getRecords(array(
'tableName' => 'ipac_articles',
'perPage' => '3',
));
list($ipac_menuRecords, $ipac_menuMetaData) = getRecords(array(
'tableName' => 'ipac_menu',
'loadUploads' => '0',
'allowSearch' => '0',
));
list($ipac_categoriesRecords, $ipac_categoriesMetaData) = getRecords(array(
'tableName' => 'ipac_categories',
'loadUploads' => '0',
'allowSearch' => '0',
));
?>
Note that the "require" statement is only required once.
Then, you can add the code to display the records as required.
Straight forward once you've done it a couple of times!
Good luck! [:)]
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Blended List View from Multiple Sections
By aev - August 12, 2009
I think the actual blend is missing from your recipe? Or am I missing something here?
-aev-
Re: [aev] Blended List View from Multiple Sections
By zip222 - August 12, 2009
Re: [jdancisin] Blended List View from Multiple Sections
By aev - August 12, 2009
http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/Records_from_multiple_sections_into_one_viewer_P73668/
Re: [aev] Blended List View from Multiple Sections
Looks like I misunderstood what you meant by "blended". Do you mean all the records from Field1, then all the records from Field2, then all the records from Field3 in order by creation date?
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Blended List View from Multiple Sections
By Chris - August 12, 2009 - edited: August 13, 2009
I've just posted a response to aev with a How-To in the following thread:
http://www.interactivetools.com/forum/gforum.cgi?post=73679#73679
Please let us know if that doesn't help solve your problem!
Chris