Page 1 of 1

New module and elements per page

Posted: Tue Sep 27, 2011 4:27 pm
by bobonov
I tried to look in the forum but none of the topic seem to address my problem.
I have a classic template, left column with news category and latest news and main page body.
What I want to obtain is to have just the last 3 news on the left column but when I open a category I want a pagination by 10 news per page.
I looked at the various parameter but didn't find something that solve my problem.
It seem to me that the only solution is to create 2 different template, one that is initialized with 10 result per page and print the category list and a second one that is initialized with 3 news per page and print the article summary.
I hope I missed some parameter and there is a better way to handle this.

Re: New module and elements per page

Posted: Wed Sep 28, 2011 12:51 am
by applejack
{news number='3'}
{news pagelimit='10'}

Re: New module and elements per page

Posted: Thu Feb 16, 2012 7:52 am
by bobonov
Sorry for the late reply.
Probably I didn't explain clearly my problem.
The parameter you suggested "pagelimit" and "number" are the same, from the news module help:
(optional) number="100000" - Maximum number of items to display (per page) -- leaving empty will show all items. This is a synonym for the pagelimit parameter.
So I'll try to explain my need more clearly:
in all the pages I have a right columns that show the last 5 news:

Code: Select all

            <div id="news">
                {news number='5' detailpage='news'}
            </div>
If I click on the news category link I get the page that list the news in this category.
Now I want that in this page the news are listed 10 per page but the number of news listed in the page is inherited from the news setting made in the right columns.

Why I need this?
simply because showing the news summary in a side columns do not allow to put many entry (ideally the maximum is 3), it easily became very long giving an horrible layout result, while showing them in the main container became possible to show 10 item without worrying to screw the page.