How to limit number of news at newsbar at left side the site?

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.
Locked
lenny

How to limit number of news at newsbar at left side the site?

Post by lenny »

Hi

I am looking for a way to limit the number of news in the left side of my site just under the menu. I have tried to use the expiration date but that makes the news disappear from news bar and a news page I have made. What I would like is for the news to stay shown at the news page although expiration date has run.

Is there any one that tried this before? Or knows of any documentation I might read?

/Lennart
lenny

Re: How to limit number of news at newsbar at left side the site?

Post by lenny »

I use version 1.0.2  ::)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to limit number of news at newsbar at left side the site?

Post by Dr.CSS »

If you go to Extensions » Modules and click 'News' it will get you to help page the parameters News takes are there...

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 server'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.
lenny

Re: How to limit number of news at newsbar at left side the site?

Post by lenny »

Thanks it, I now can control it a bit better but for some reason the news continue to fill up under the menu  :'( And the page “news” I made for all the news I can control with info you gave me  :)

It seems like I have no control over the newsbar ???

Do you now a way to limit the shown news to maybe 2 while the newspage show all news old and new?

/Lennart
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to limit number of news at newsbar at left side the site?

Post by Dr.CSS »

If you are using the default install the news is hard coded in the template, that's where you would put number="2".
Locked

Return to “CMSMS Core”