Problem with News Pagination
Posted: Thu May 17, 2007 4:53 pm
I'm creating my first CMSMS site and really enjoying the program. However, I've hit a bit of a snag with the news module and pagination. I followed the instructions in the wiki (http://wiki.cmsmadesimple.org/index.php ... fined_Tags) for pagination and have the following in my news page:
However, the result is not exactly what I was looking for. I get only a plain text number 1 -- no links or anything.
Changing the start number to 1 as follows gets me an older stories link and a number 1 link. Clicking the older stories link changes the url and removes the link without changing the content while clicking the number 1 link brings back the older stories link:
Obviously, something is not right as the entries displayed are not changing. However, I have very little understanding of PHP so I'm really not sure where to go from here. Any help would be much appreciated.
Code: Select all
<h1>News</h1>
{news number='5' category='news'}
{newsindex number='5' start='0' category='news' count_expired='true' delimiter='|'}
{cms_module module='news' number=$news_number start=$news_start category='news' showarchive='true'}
{if $news_start > '0'}<a href="{$news_prev_url}">Older stories</a> {/if}
{$newscrumbs}
{if $news_start + $news_number< $newscount}<a href="{$news_next_url}">Newer stories</a> {/if}
Changing the start number to 1 as follows gets me an older stories link and a number 1 link. Clicking the older stories link changes the url and removes the link without changing the content while clicking the number 1 link brings back the older stories link:
Code: Select all
<h1>News</h1>
{news number='5' category='news'}
{newsindex number='5' start='1' category='news' count_expired='true' delimiter='|'}
{cms_module module='news' number=$news_number start=$news_start category='news' showarchive='true'}
{if $news_start > '0'}<a href="{$news_prev_url}">Older stories</a> {/if}
{$newscrumbs}
{if $news_start + $news_number< $newscount}<a href="{$news_next_url}">Newer stories</a> {/if}