Foren / Cotonti / Skins / News SubCategory Styling

fraze
#1 4. September 2009, 20:54
Is there any way to specify different styles for news subcategories?

I want one overall style, but if i specify the news is part of a sub category - say 'weekend news' for instance then it'd be nice if that could have a different style element (bg for instance).

can't find anything in the .tpl files or css regarding this.

any help would be great :)
Lombi
#2 4. September 2009, 21:15
What you could do is to either have:

- custom header for that category - like header.weekendnews.tpl
- css styles based on the category code in the template
<a href="http://www.domenlo.com">Surreal Art</a>
fraze
#3 4. September 2009, 21:30
ideally this is for individual posts on the frontpage, so we can easily distinguish between news types.

would those custom headers allow for the frontpage as well? or just the news posts when you went into them directly.
Lombi
#4 4. September 2009, 22:35
Then option 2, easy. Each news can have its own style, if you add a class named after the category code.
<a href="http://www.domenlo.com">Surreal Art</a>
fraze
#5 4. September 2009, 22:44
ok will give it a go & see how i get on - thanks Lombi
foxhound
#6 5. September 2009, 06:29
We added the page_row_author tag in the news.tpl to specifiy the css to use. So, by filling in the author field with the css name we wish to use for that particular news item we can tell it to use any kind of style for any news post.

Works great too, but I did not know you could add the style name after each category code.
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />