Page 1 of 1

News problem

Posted: Thu Mar 30, 2006 12:36 pm
by maxilmago
I have the necessity that the News of the site are seen: 
 
In the page News are had to see my 4 categories therefore only the name of the news. 
 
In the page where I see all the newses of the category the page it has to have the last 10 and the possibility to change page to see the following 10 
can you be done? 
 
Now my page lengthens http://www.elitemanagement.it/news.php

Re: News problem

Posted: Thu Mar 30, 2006 7:25 pm
by Dr.CSS
can you show what your template says?
you can say    number="10"  at the end where you put the news module,
and i believe you can limit it by publish date or author.
if you go to modules and hit  "about" on the news module it will tell you the parameters to use.

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.

  HTH
          mark

Re: News problem

Posted: Fri Mar 31, 2006 8:45 am
by maxilmago
in the page News I use the tag {cms_module module = "news"} 
 
if I put number = "10" it makes me see only 10 newses.... 
 
I want that they are seen in 
page_01---> from 1 to 10 
page_02---> from 11 to 20 etc 
 
Possible that owe to create me the pages? because it doesn't do him/it in automatic?

I want a before and back

Re: News problem

Posted: Fri Mar 31, 2006 2:55 pm
by Dr.CSS
if I put number = "10" it makes me see only 10 newses.... 

I want that they are seen in 
page_01---> from 1 to 10              * (optional) number="5" - Maximum number of items to display =- leaving empty will show all items.

page_02---> from 11 to 20 etc          * (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

you can combine the parameters
{cms_module module = "news" number="10"} 
{cms_module module = "news" start="11" number="10"}
{cms_module module = "news" start="21" number="10"}

like that is what your looking for?
O ya                           
the back link                  {cms_selflink dir="previous"}

and the next link                  {cms_selflink dir="next"}
                                 

  HTH
          mark

Re: News problem

Posted: Fri Mar 31, 2006 2:59 pm
by calguy1000
No, there's no built in pagination for the news module.

The primary reason this wasn't done, is that everybody wants news to behave slightly differently.  Some use it for articles, some for limited amounts of news, etc. 

Though I think that there is a feature request in the forge for this.  If there isn't you may want to add one.