How do I post a single item to multiple sections and merge section listings into one sorted list?

3 posts by 3 authors in: Forums > CMS Builder
Last Post: December 16, 2009   (RSS)

Re: [zakcoop] How do I post a single item to multiple sections and merge section listings into one sorted list?

By rconring - December 16, 2009

Here is the answer to the XML generation
http://www.interactivetools.com/docs/cmsbuilder/rss_feeds.html
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

Re: [zakcoop] How do I post a single item to multiple sections and merge section listings into one sorted list?

By Chris - December 16, 2009

Hi Aaron,

The easiest way to set something like this up is to use two multi-record sections: articles and categories. Create a list field in the articles section called "categories" and set it to be multi-value. You can then select which category or categories you want an article to belong to. Your home page can be a simple article list page, while your category pages will need to filter articles that belong to that category. To do this, you can add a "where" clause to the code that gets the articles, for example:

$thisCategory = "vegetables";
list($articlesRecords, $articlesMetaData) = getRecords(array(
'tableName' => 'articles',
'where' => "categories LIKE '%\t" . mysql_escape($thisCategory) . "\t%'",
));


I hope this helps! Please let me know if you have any questions.
All the best,
Chris