Page 1 of 1
News Article template question(s)
Posted: Wed Nov 14, 2007 7:04 pm
by Norrabel
Does anyone know how I can change the template that the news article page uses?The page links from the home page with the MORE button and uses the same template as attached to home page rather than the default template which is for the inside pages. Since this happens, the navigation highlights HOME. I want the News to be shown using a different template than the template used from the page where it originates. Is this possible??? I can't find where to set the template for the news pages.
To see what I mean, see my site:
http://www.trexlernaturepreserve.org
The EVENTS is really the news module.
Also, I would like to remove both the postDate and the Posted by and if you could tell me how to do that too, I'd greatly appreciate the help.
Re: News Article template question(s)
Posted: Wed Nov 14, 2007 7:51 pm
by RonnyK
Norrabel,
use
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.
Create a page with some name, mark it as "not shown in menu" on the options-tab and call that page as the detailpage in the calling of the {news}. If the more-link is clicked, the details will be shown in the detailpage instead of replacing the content of the current page.
If you check Content -> News -> Summary template or Detail template, there is some {if}{/if}logic :
{if $entry->formatpostdate}
{$entry->formatpostdate}
{/if}
{if $entry->author}
{$author_label} {$entry->author}
{/if}
If you remove these lines, it wont show in the display.
Ronny
Re: News Article template question(s)
Posted: Wed Nov 14, 2007 8:03 pm
by kermit
#
# (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.
may help with your first point; however it does NOT address the fact the same thing occurs with the articles linked from the RSS feed, as those links will ALWAYS use the "default" page in CMSMS regardless.. which causes the additional problem of being in the WRONG LAYOUT on sites (3) i'm working on now.. the "default" page uses an entirely different layout than 'inside' pages.
i think a 'default page' for details needs to be configurable in the news module itself; and then overridden, if desired, in the module tag.
the second questions; remove those fields from the summary or details template, as necessary; or simply hide them with css.