News layout

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
jnf
Forum Members
Forum Members
Posts: 14
Joined: Mon Jul 10, 2006 2:25 pm

News layout

Post by jnf »

Hey.

How can i make another layout to, how the News will be shown?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: News layout

Post by Dr.CSS »

copy/paste existing template, make changes you want, follow instructions in the News module Help copied here for you :.

How do I use it?

The easiest way to use it is in conjunction with the cms_module tag. This will insert the module into your template or page anywhere you wish, and display news items. The code would look something like: {cms_module module="news" number="5" category="beer"}
Parameters

    * (optional) start="5" - Start at the nth item -- leaving empty will start at the first item.
    * (optional) number="5" - Maximum number of items to display =- leaving empty will show all items.
    * (optional) dateformat="%b %d, %Y" - Format to display the article's post date with. This is based on the strftime function and can be used in your template with $entry->formatpostdate. It defaults to %x, which is the default date format for the sever's locale.
    * (optional) makerssbutton="true" - Make a button to link to an RSS feed of the News items.
    * (optional) category="category" - Only display items for that category. Use * after the name to show children. Multiple categories can be used if separated with a comma. Leaving empty, will show all categories.
    * (optional) moretext="more..." - Text to display at the end of a news item if it goes over the summary length. Defaults to "more..."
    * (optional) summarytemplate="sometemplate.tpl" - Use a separate template for displaying the article summary. It have to live in modules/News/templates.
    * (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.
    * (optional) sortby="news_date" - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title". Defaults to "news_date".
    * (optional) sortasc="true" - Sort news items in ascending date order rather than descending.
    * (optional) lang="en_US" - Parameter is used to specify what language to use for display on the frontend. Not all modules support or need this.
Post Reply

Return to “CMSMS Core”