Re: [sagentic] Multiple Viewers of same content with variation
Hi benedict,
Thanks for your post!
Sagentic's method will work, and would help to keep your files organized a bit. There is another method available though, which is to change the names of the variables used in your "STEP 1" code. Take this code for example:
<?php
require_once "/path/to/lib/viewer_functions.php";
list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'limit' => '1',
));
?>
If you wanted to display the same content differently, you could rename the variables and append it like this:
<?php
require_once "/path/to/lib/viewer_functions.php";
list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'limit' => '1',
));
list($newsHeadlineRecords, $newsHeadlineMetaData) = getRecords(array(
'tableName' => 'news',
'limit' => '5',
));
?>
You would then adjust the second set of list code used later in the page to match the variable names you used there.
Feel free to contact us if you have any further questions about this. [:)]
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@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.