Page 1 of 1

SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 9:26 am
by Eskymo
Hey All

I like the way the News Module works and my client wants a section on her site that lists case studies which needs to work pretty much like the news module works...

- a page that lists all the case studies
- a detail page that is linked to from the list of case studies that shows each in more detail
- the option of having one case study on the homepage [would be great if this could be randomised]
- the option to show a case study summary on certain pages throughout the site and for this to link to the detail

I've looked through the module manager and not found anything that would do this, so wondered if it's possible to duplicate the news module.

Thanks

E

Re: is there a way of duplicating the news module and using it for something els

Posted: Wed Nov 07, 2007 12:34 pm
by lollipop27
Well, have you seen the cataloger module?

It's pretty much what you need, not?

Re: is there a way of duplicating the news module and using it for something els

Posted: Wed Nov 07, 2007 12:37 pm
by Eskymo
nope - not looked at that one - will check it out now though. Thanks for the recommendation!

Re: is there a way of duplicating the news module and using it for something els

Posted: Wed Nov 07, 2007 12:46 pm
by Eskymo
Looks like that might work - I'd overlooked it as the word Catalogue didn't jump out at me as a solution to what I needed. I'll have a play with this - it'll give me something to accomplish today.

thanks

E

Re: is there a way of duplicating the news module and using it for something else?

Posted: Wed Nov 07, 2007 12:48 pm
by RonnyK
Eskymo,

you can use News itself. As you can create categories and put specific entries in the correct catgorie. With the "category=" parameter you can call the correct category wanted, and with the summarytemplate/detailtemplate parameter calling you can have specific styling per category.

Parameter sortby="random" will pull a specific item if used in combination with number=1 f.e.

Ronny

Re: is there a way of duplicating the news module and using it for something els

Posted: Wed Nov 07, 2007 12:52 pm
by Eskymo
Now there's an idea...that might be worth a try...thanks for the tip.

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 1:21 pm
by Eskymo
RonnyK - that's saved me a ton of work and was really easy to implement...thanks ever so much!

Nearly finished the site I'm working on now - so chuffed!

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 3:19 pm
by Eskymo
I'm encountering one problem though...

I created a new summary template and a new detail template for the Case Studies and using this on the main Case Studies page:

Code: Select all

{news moretext="read more" detailpage="casestudydetail" pagelimit="5" category="CaseStudies" summarytemplate="casestudysummary"}
the casestudies use the correct casestudysummary, but for some reason on the default page revert to using the newsdetail page instead of the casestudydetail page I've specified.

I have tripple checked everything and I just can't find out where the problem is arising.

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 3:27 pm
by RonnyK
Eskymo,

you're referring in the calling to the detailpage, that is the content-page to be opened where the news should be shown. If you've created a news detailtemplate, you should call the detailtemplate, as that pulls the news-detail-template. Those are 2 different things. detailtemplate and detailpage that is.

Ronny

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 4:46 pm
by Eskymo
Sorry I'm not sure what you mean...let me explain better the problem I'm having...

Within the news module all my news stories have the category News and within the News Page template I use the following:
{news moretext="read more" detailpage="newsdetail" pagelimit="5" category="News"}

For the news page on the site to list all the current news stories I created a summary template called 'newssummary'
For the news detail page on the site to show the full news story I created the detail template called 'newsdetail'

so to have a different section of the site for case studies I created a new category within the news modules called CaseStudies and within the CaseStudies Page template I ussed the following:
{news moretext="read more" detailpage="casestudydetail" pagelimit="5" category="CaseStudies" summarytemplate="casestudysummary"}

For the case study page on the site to list all the current case studies I created a summary template called 'casestudysummary'
For the case study detail page on the site to show the full case studies I created the detail template called 'casestudydetail'

All straightforward I thought. But for some reason the case study detail page on the site uses the newsdetail template instead of the casestudydetail template and I can't figure out why. I don;t want the dates appearing on the case study pages and that's why I created a new template for this category. I've removed all reference to the date within the casestudydetail template so that's how I know it's using the newsdetail template instead.

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 5:22 pm
by RonnyK
Eskymo,

what I meant was that the newsdetailtemplate isn't called from within the news-calling and thus takes the default template.

Ronny

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 5:24 pm
by Eskymo
so can you only have one newsdetail template?

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 5:26 pm
by RonnyK
No, you can have more, but you have to call them specifically, otherwise the default will be used, similar as with summary.
detailtemplate=""
has to be included in the calling.....

Ronny

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 5:29 pm
by Dr.CSS
You probably only have one news detail template now and if it's not told diff. in the news tag it will default to the existing one...

{news moretext="read more" detailpage="casestudydetail" pagelimit="5" category="CaseStudies" summarytemplate="casestudysummary" detailtemplate="nameofnewtemplate"}

You make new detail templates like making new summary templates...

Re: SOLVED : is there a way of duplicating the news module?

Posted: Wed Nov 07, 2007 5:30 pm
by Eskymo
oh I see what you mean now - I'm getting confused with all the similar names for everything. thanks for clearing that up for me! Sorry for being so thick...it makes perfect sense now.