News Article template question(s)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Norrabel
New Member
New Member
Posts: 7
Joined: Wed Nov 07, 2007 2:47 pm

News Article template question(s)

Post 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. 
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: News Article template question(s)

Post 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
Last edited by RonnyK on Wed Nov 14, 2007 8:09 pm, edited 1 time in total.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: News Article template question(s)

Post 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.
Last edited by kermit on Wed Nov 14, 2007 8:06 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “CMSMS Core”