Headlines by Keyword?
2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 8, 2013 (RSS)
By osga - March 7, 2013
We're lookin to see if we can make a feed for our homepage based on a keyword, pulling from different categories. Any thoughts would be helpful...
By gregThomas - March 8, 2013
Hi,
If you want to pull data from different sections you could use the multisearch function, here is an example of how to use it:
http://www.interactivetools.com/forum/forum-posts.php?postNum=2229396#post2229396
If the different records are stored in the same section, you could use the getRecords function and add a where statement that allows you to select a category:
$category = 'keyword';
// load records from 'blog'
list($blogRecords, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
'loadUploads' => true,
'allowSearch' => false,
'where' => "category = '$category'"
));
Let me know if you have any questions.
Thanks!
Greg
PHP Programmer - interactivetools.com