Page 1 of 1
<! duplicating news module
Posted: Thu May 04, 2006 12:08 am
by mikemcvey
Just a query as to how much work it would take to duplicate this module...
So instead of 2 categorys [ news, recentevents ] have 2 modules.... [ news ] and [ recentevents ]
Is it as simple as just duplications the folder and editing the News.module.php??
mike
Re: <! duplicating news module
Posted: Thu May 04, 2006 12:33 am
by calguy1000
duplicating a module is relatively easy, but has it's drawbacks.
The big question is "why would you want to?"
Is this something that needs to be changed in the news module?
Re: <! duplicating news module
Posted: Thu May 04, 2006 2:03 am
by mikemcvey
re: "Is this something that needs to be changed in the news module?"
...it would be nice to be able to have different templates... ie display [ beer ] news in a different template than [ wine ] news.
...and it would be nice to be able to set the order of the items manually like page order.
I really want to seperate the news so that a client can log in and go straight to [ beer ] or [ wine ] and edit the content. Rather than having to use the dropdown to select.. I can see a problem where the admin client enters the "wrong news into the wong section"
Re: <! duplicating news module
Posted: Thu May 04, 2006 4:52 am
by cyberman
mikemcvey wrote:
...it would be nice to be able to have different templates... ie display [ beer ] news in a different template than [ wine ] news.
RTFM

...
You can define your own summary and detail templates with {cms_module module="news" number="5" category="wine" summarytemplate="winetemplate.tpl" } or {cms_module module="news" number="5" category="beer" detailtemplate="beertemplate.tpl"}
...and it would be nice to be able to set the order of the items manually like page order.
Here you have the option to play with start date and sort with {cms_module module="news" number="5" category="Bier" sortby="news_date"}. There are some other order options too.
I really want to seperate the news so that a client can log in and go straight to [ beer ] or [ wine ] and edit the content. Rather than having to use the dropdown to select.. I can see a problem where the admin client enters the "wrong news into the wong section"
IMHO that should not really be an option

- that's your job to instruct your clients. Write a short FAQ, HowTo, a check list or so other for clients.
Re: <! duplicating news module
Posted: Tue May 16, 2006 9:57 pm
by Signex
is it also possible to give every news template its own CSS ?
Re: <! duplicating news module
Posted: Tue May 16, 2006 10:19 pm
by Dr.CSS
if the news category only shows up on one template then yes..
and i changed the 'News' Module into 'Blog' Module as seen here...
http://www.multiintech.com/index.php?page=blogger
it's also used on a couple of other pages with the News next to it....
mark
Re: <! duplicating news module
Posted: Wed May 17, 2006 10:32 am
by tsw
is it also possible to give every news template its own CSS ?
in summary template chenge line
to
Code: Select all
<div class="NewsSummary {$entry->category}">
then you can style different categorys with css
same goes with detail template but you would need to wrap it first like this
Code: Select all
<div id="NewsPostDetailWrapper" class="{$entry->category}">
[old template content here]
</div>
happy styling

Re: <! duplicating news module
Posted: Wed May 17, 2006 10:38 am
by Signex
Thanks thats what i needed !
