Page 1 of 1

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

Posted: Wed Jul 19, 2006 10:24 pm
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

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

Posted: Sat Jul 22, 2006 1:31 am
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.

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

Posted: Sat Jul 22, 2006 8:32 am
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}.

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

Posted: Sat Jul 22, 2006 11:27 am
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

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

Posted: Sun Jul 23, 2006 11:26 am
by westis
Yeah, that's true! I've never really used the News content type, but this is a good use for it indeed.