Page 1 of 1

News module template confusion! Help...

Posted: Mon Nov 05, 2007 8:54 am
by sarah_h
Hi All,

I'm using news 2.3 and it works very well indeed. I'm in need, though, of different summary templates for different news items. So, look at this (I'm describing the templates in the news module):

news 1 (at the moment I using the 'sample' summary template)

news 2 (this uses 'sample' as well of course.)

If I wanted news 2 to use a different summary template how could this be done. I see that I can create another summary template but I don't see to to assign it to a news article.

I'm unclear about the reason why I needed to use the sample ST but that's the one which changed things when I edited it. So it's clear to see that I'm confused about the way that these news ST's and DT's work. So would anybody be able to assist me in this, particularly how to assign a different template to different news items.

Sarah

Re: News module template confusion! Help...

Posted: Mon Nov 05, 2007 11:55 am
by lollipop27
I'm not wuite sure what you want....

do you want to style every single news article differently or do you want to style the news on the one page differently than on the other page....

second version: add the option summayrtemplate="_yourtemplate_" in the {news} tag....

its always useful to read the documentation...

this template you can add in the news page in the tab summarytemplates.... but I think you know that....  ;)

Re: News module template confusion! Help...

Posted: Mon Nov 05, 2007 12:10 pm
by Rob_H
Thanks for getting back to me!

I'm looking to style news items on one page differently to news items in the sidebar. I create news and pop then in different categories. I know how to display news items from different categories I was confused about how to style the page news items and the sidebar news items differently. Say how to style news items (summaries) from the 'General' category (which will be seen in the main page body)  differently to those on the sidebar.

I'm getting more and more confused. I guess I'll read some more.

Thanks

Sarah

Re: News module template confusion! Help...

Posted: Mon Nov 05, 2007 6:36 pm
by Dr.CSS
You can use the same summary template and style them diff., use #sidebar .NewsSummary etc. to style it there then #main .NewsSummary for those....