Page 1 of 1

List articles of a specific category

Posted: Sun 23. May 2004, 17:58
by Sparky
Like the title says: Is there a way to list articles of a specific category, but not while editing the article. I know that there's an content type available for this purpose.

But I mean some kind of replacement tag for the template. My aim is to show article lists from 3 different categories on every page. So i must integrate it somehow into the template. Is there any workaround for this? Thanx guys!

Re: List articles of a specific category

Posted: Sun 23. May 2004, 18:35
by DeXXus
Sparky wrote:Like the title says: Is there a way to list articles of a specific category, but not while editing the article. I know that there's an content type available for this purpose...

But I mean some kind of replacement tag for the template.

Code: Select all

{RELATED:max_count_links} 
Place the x number of related articles based on keyword I guess? 
eg: {RELATED:5}
Sparky wrote:My aim is to show article lists from 3 different categories on every page.
Unfortunately, this tag would show 'X' number of articles of a single category (based on keyword) and disallow different categories to exist in the same section :(

Posted: Sun 23. May 2004, 18:39
by Sparky
hmm

This would only show related articles to the actual one from all categories based on related keywords search.

I thought of something like {LIST_CAT_ARTICLES:CatID} where CatID is the category id from which the articles should be listed.

Posted: Sun 23. May 2004, 19:59
by Sparky
Ok. Answering own qustions: In content.func.inc.php I've included:

Code: Select all

// Simple Navigation table of current cat
if( ! ( strpos($content["all"],'{NAV_TABLE_CAT:')===false ) ) {
	$content["all"] = preg_replace('/\{NAV_TABLE_CAT:(\d+)\}/e','nav_table_simple_struct($content["struct"], $1);', $content["all"]);
}
Now it lists subcategories of a given category, but still no articles...lol
But that's a start, isn't it? :wink:

If i put each article in different subcategory... :idea:

How to display articles of other categories?

Posted: Mon 9. Aug 2004, 14:40
by Nik2004
Hi,

If you have found a solution to this problem, please notify me. I want to display article lists of two categories (e.g. Announcements and News) in the homepage.

Anyone else who may have a workaround?

Nick