Hi, I'm sure this has been covered but I don't seem to be able to find out where...
I have 2 news blocks, one on the HOME PAGE and one on a NEWS PAGE.
I want the one on my home page to be limited to 3 news items,
and I want the one on my news page to list ALL of my news items.
If I use the parameter number="3" then you get the awkward arrows, like this: "Page 1 of 2 > >>"
- Which I really don't want, instead I just want 3 items, and that's it.
Let me know if you've got the code, I've been working on this for too long now, many thanks in advance.
Limiting News Items
Re: Limiting News Items
Pagination is set in the summary template. Just edit your summary template if you want to change it. On the top of the sample (default) template you'll see something like:
Simply create a new template without that stuff if you do not want the pagination. Remember to use summarytemplate="nameofyourtemplate" in the {news}-tag if you want to use your custom no-pagination-template.
For more, see this thread: http://forum.cmsmadesimple.org/index.php?topic=16684.msg82513
Code: Select all
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
For more, see this thread: http://forum.cmsmadesimple.org/index.php?topic=16684.msg82513
Re: Limiting News Items
And about those news.. almost the same problem here. I want to show only one news article on homepage and detailed straight away. When you add {news...} first you see summary, then you have to click on more, to see detailed view. I want that detailed view straight away.
Re: Limiting News Items
@gemini Also this you can do by modifying the summary template. Simply change the default template (or create a new one) and use {eval var=$entry->content} where you want to insert the content of a news item.
If you look closer at the default template, you'll see how it works and what other tags you can use (for summary, extra, date, category, etc).
Good luck!
If you look closer at the default template, you'll see how it works and what other tags you can use (for summary, extra, date, category, etc).
Good luck!
Re: Limiting News Items
This one solved i think ;]