News Module Question - Alternate templates?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
ostricized

News Module Question - Alternate templates?

Post by ostricized »

Hi all.

I am currently using v.2.0.3 of the News Module in conjunction with CMSMS v0.13.

You can view the work in progress here; http://mm.drunkenlords.com/

My question is; I have placed a news category summary on the home page, now when I click "more" it uses the home page template for the full content.

What I would like to do is change the 'full content' template (not the detail template itself, which is fine) to a different template other then the homepage template which should be unique when you click on "More".

Is it possible to do this? Has anyone done this already?

Thank you for your time.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: News Module Question - Alternate templates?

Post by Elijah Lofgren »

ostricized wrote: Hi all.

I am currently using v.2.0.3 of the News Module in conjunction with CMSMS v0.13.

You can view the work in progress here; http://mm.drunkenlords.com/

My question is; I have placed a news category summary on the home page, now when I click "more" it uses the home page template for the full content.

What I would like to do is change the 'full content' template (not the detail template itself, which is fine) to a different template other then the homepage template which should be unique when you click on "More".

Is it possible to do this? Has anyone done this already?

Thank you for your time.
One of these paramaters should be what you want:
# (optional) detailtemplate="sometemplate.tpl" - Use a separate template for displaying the article detail. It have to live in modules/News/templates.
# (optional) detailpage="pagealias" - Page to display News details in. This can either be a page alias or an id. Used to allow details to be displayed in a different template from the summary.
From: /admin/listmodules.php?action=showmodulehelp&module=News
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
ostricized

Re: News Module Question - Alternate templates?

Post by ostricized »

Elijah Lofgren - Thank you very much - Adding the page alias;

Code: Select all

detailpage='breaking_news'
Is precisely what solved this issue for me.
whyggy

Re: News Module Question - Alternate templates?

Post by whyggy »

Okay so you need to add this options, but can you please explain which tag do you put in your detailtemplate to show this news details  ??

just {news} ? or just {content} ??

Thx very much

Whigg
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: News Module Question - Alternate templates?

Post by Elijah Lofgren »

whyggy wrote: Okay so you need to add this options, but can you please explain which tag do you put in your detailtemplate to show this news details  ??

just {news} ? or just {content} ??

Thx very much

Whigg
Should work:

Code: Select all

{eval var=$entry->content}
Elijah (now a tired, busy college student)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
neild

Re: News Module Question - Alternate templates?

Post by neild »

This is what I need.

Can you explain what goes where exactly.

thx
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: News Module Question - Alternate templates?

Post by Elijah Lofgren »

neild wrote: This is what I need.

Can you explain what goes where exactly.

thx
If you're talking about:
Elijah Lofgren wrote:
whyggy wrote: Okay so you need to add this options, but can you please explain which tag do you put in your detailtemplate to show this news details  ??

just {news} ? or just {content} ??

Thx very much

Whigg
Should work:

Code: Select all

{eval var=$entry->content}
Elijah (now a tired, busy college student)
1. Login to CMSMS Admin Panel.
2. Go to Content -> News
3. Click on the Detail Template tab.
4. Paste in that code where you want the news text to display.

If you're talking about:
ostricized wrote: Elijah Lofgren - Thank you very much - Adding the page alias;

Code: Select all

detailpage='breaking_news'
Is precisely what solved this issue for me.
Then find the code in your page template where you are calling news.
It might look like this:

Code: Select all

 {news limit=3 detailpage='news'}
and change it to something like this:

Code: Select all

 {news limit=3 detailpage='news' detailpage='breaking_news'}
where "breaking_news" is the alias of the page you want the news shown on.

Or I may be misunderstanding that you are trying to do, if so please explain.

Hope this helps,
Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
neild

Re: News Module Question - Alternate templates?

Post by neild »

Please explain in detail how to achieve the following:

'I would like to change the 'full content' template to a different template other then the homepage template which should be unique when you click on "More".'

thx
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News Module Question - Alternate templates?

Post by Dr.CSS »

'I would like to change the 'full content' 1)This in the news templates, which are in the News section of the admin, is called the detail view template to a different template other then the homepage template 2)this means you want it to show up on a diff. page which should be unique when you click on "More".'

In the the admin of the News module the tab for summary and detail templates shows what calls are going to be used to display what part of the article you want....

From the summary template...

{$entry->formatpostdate}  the posted date

{$entry->titlelink}  the title of article as a link to detail of article

Category: {$entry->category}  obvious

Posted by: {$entry->author}  obvious

{eval var=$entry->summary}  stuff in the summary content edit box when creating new article

[{$entry->morelink}]  obvious

{eval var=$entry->content}  stuff in the content content edit box when you make new article

The detail template has a few diff. calls arranged a little diff.... all calls can be deleted or rearranged to suit your taste or you can use a custom template, if you make one by copying one of these and put it in the root/modules/news/templates folder, and call it in your tag, more info on this is in the help, go to Extensions » Modules and click the word Help across from News.

To get the detail to show on another page, other than the one the summary is on, use the detailpage='pagealias' call in your tag, this page can be totaly diff. than any other page or the same with minor changes how ever you want it to look.

To find the alias of the page go to Content » Pages » Edit Page: name of page and click the Options tab.
Locked

Return to “Layout and Design (CSS & HTML)”