How-To, News module: Changing the page template for detailed news in 10 steps

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Locked
Michael AC

How-To, News module: Changing the page template for detailed news in 10 steps

Post by Michael AC »

Hi community,

normally, when clicking on the [more] news summary link, the detailed news page opens with the same page template the news summary page is bound to.

Start pages are packed with menus, icons, pictures and of course news summaries. When clicking on the [more] link, the detailed news are placed somewhere between all this huddle of information although you are in need for more space especially for the news.

Now, here's how it works:
(Unfortunately my backend [0.13] is german, so I'll try to translate it. Maybe the menu items are called a little bit different...)

1)
Add a new page with Content > Pages >Add New Content

2)
Choose  Content Type = "News".

3)
Enter Page Alias = "News".
Choose Template = Other than home page template. (Hoping you've created a different template before...  ;) )

4)
check "active"
uncheck "show in menu"!
leave the rest as it is. You don't need it!

5)
click "Send"

6)
Go to Layout > Templates

7)
Choose the template where you've placed the news summary.

8) ...hey this ought to be an 8 with a bracket... tststs... attack of the killer emoticons!
Change the news module call to {cms_module module="news" detailpage="News"}
Remember? The "News" after "detailpage=" is the page alias you've entered on the news page you've created on step 5.

9)
Save your template, open your home page, click on the "more" link

10)
enjoy!

Comments? Improvements?

Regards
Michael
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: How-To, News module: Changing the page template for detailed news in 10 step

Post by Elijah Lofgren »

Michael AC wrote: 8) ...hey this ought to be an 8 with a bracket... tststs... attack of the killer emoticons!
Change the news module call to {cms_module module="news" detailpage="News"}
Remember? The "News" after "detailpage=" is the page alias you've entered on the news page you've created on step 5.
Thanks for reminding me of this I think I knew about it, but I'd forgotten. It's come in useful on my website. :)

You could post this in the wiki someplace if you'd like.
Maybe here or a subpage of this: http://wiki.cmsmadesimple.org/index.php ... ntent/News

Thanks again.
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. :)
westis

Re: How-To, News module: Changing the page template for detailed news in 10 step

Post by westis »

Yeah, this is very handy. But I don't think the detail page needs to have the News content type. It can be just like a normal page with any content type, as the detailed news article is replacing whatever is in {content}.
Michael AC

Re: How-To, News module: Changing the page template for detailed news in 10 steps

Post by Michael AC »

Hi there,

yes, you're right. It can be the normal content page as well as (possibly) every other type. I've tested this.

But the news type content needs only a (very) few input data. The Content Type content needs all his fields filled with some kind of information. Kind of annoying... :)

Regards
Michael
westis

Re: How-To, News module: Changing the page template for detailed news in 10 step

Post by westis »

Yeah, that's true! I've never really used the News content type, but this is a good use for it indeed.
Locked

Return to “Tips and Tricks”