I'm interested in attempting to "stripe" the news short story listing using the "oneortwo" parameter. What I'd like to do is apply a different background colour to each item to visually separate the listed articles.
I understand that when something like class="title_{oneortwo}" is encountered, the script will alternate between style class title_one and title_two. But I'm not sure where I would go about defining these classes.
Does this get defined right in the template? If so, where? And how?
If anyone has a template that incorporates this, I'd appreciate a copy. I could suss it out by using that as an example.
( This is where that Template Export/Import feature comes in handy. ;-) )
Any tips, pointers or hand-holding appreciated.
Ray
Styling {oneortwo}
is fairly straight forward. When you use it in your template like so
<span class="article_{oneortwo}">{article}</span>
When viewing your news the system will alternate between outputting
<span class="article_one">{article}</span>
and
<span class="article_two">{article}</span>
You can then style those articles using some css
.article_one {
...
}
.article_two {
...
}
Thanks, Chris.
Does that CSS
.article_one { ... } .article_two { ... }
get included in the template somehow?
Or must I create the styles in my site CSS file externally to N-13 News?
You put that css in your site css file. You don't include it in the template.
So on the page which you include your news into, say for example that page is http://example.com/index.php and that page uses a css file http://example.com/css/main.css, that css file is where you would put that sample css code.
Got it.
The templates have so much CSS in them, I assumed I had to wedge it in there somehow. :-D
Sláinte.
Ray.