Page 1 of 1

[Solved] Output only certain number of news

Posted: Sun Oct 10, 2010 2:03 pm
by dkost
Hello, I'm a novice with CMS.

I want to make a output of onle certain number of news ot the main page without any pages with more news.
I put {news number="2"  sortasc="false"}, but I in the top of the form I have "Page 1 of 2  > >>". How to avoid this? I need only one page with 2 last news without any page of's.

Re: Output only certain number of news

Posted: Sun Oct 10, 2010 2:34 pm
by David James Arnold
I think, although I am a novice too, you goto the news template and delete the following section.

{if $pagecount > 1}
 
{if $pagenumber > 1}
{$firstpage} {$prevpage} 
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber
{/if}

Hope this helps.

David

Re: Output only certain number of news

Posted: Sun Oct 10, 2010 2:44 pm
by Peciura

Re: Output only certain number of news

Posted: Sun Oct 10, 2010 2:52 pm
by dkost
David James Arnold wrote: I think, although I am a novice too, you goto the news template and delete the following section.

{if $pagecount > 1}
 
{if $pagenumber > 1}
{$firstpage} {$prevpage} 
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber
{/if}

Hope this helps.

David

Unfortunately not.  :(

Re: Output only certain number of news

Posted: Sun Oct 10, 2010 3:10 pm
by Dr.CSS
If you have a news summary template w/o that code in it and the 'pages of' stuff still shows up you are not doing something right, check that the summary template doesn't have that code and make sure if it's not marked as default that the news tag calls it...

Re: Output only certain number of news

Posted: Sun Oct 10, 2010 3:57 pm
by David James Arnold
Agree with Dr.CSS, I did it on my template and it did exactly what you are asking.

Check you have done it for detailed and summary templates.

Re: Output only certain number of news

Posted: Sun Oct 10, 2010 8:19 pm
by Dr.CSS
The detail template doesn't have that as detail is a one show article at a time situation...

Re: Output only certain number of news

Posted: Wed Oct 13, 2010 3:39 pm
by dkost
David James Arnold wrote: Agree with Dr.CSS, I did it on my template and it did exactly what you are asking.

Check you have done it for detailed and summary templates.
Thanks David James Arnold and Dr CSS. All work fine.