
Tinnie
User
Aug 9, 2007, 8:57 AM
Post #1 of 7
(7130 views)
Shortcut
|
|
Make a description for your category index page
|
Can't Post
|
|
If you have a lot of categories, like I do, it is nice to have a little description per category on top of the category index page. Ofcourse it is possible to do this in the template, but that means lot's of different templates. Here is what I did: - Create a category Description - Create articles with as a first category the category the description is for, and as second category the category Description - Create a template for the description, which can be a simple as: <!-- template insert : $articleList$ --> <!-- templatecell : articleRow --> <!-- templateIf: $article.category2num$ eq '102' --> <strong>$article.title$</strong><br> $article.summary$ <!-- /templateIf --> <!-- /templatecell : articleRow --> (read on for more about this 102) - Create a publishing rule 'list of articles', multiple files, placeholder set name 'description', filename something like: include_description_<catNum> - Now in your cat index include the includes you just made, with: <!--#include virtual="$published.description.webpath$" --> - In your article list in the category index make a templateIf to exclude the description in your listing. Mine is like this: <!-- templateIf: $article.category2num$ ne "102" --> where 102 equals the category 'description' and it is category2num because the first category is the category the description is for, the second category is 'description'. Works for me! Tinnie.
(This post was edited by Tinnie on Aug 9, 2007, 9:21 AM)
|