Page 1 of 1

Problem with News Pagination

Posted: Thu May 17, 2007 4:53 pm
by kdallman
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:

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}
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:

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}
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.

Re: Problem with News Pagination

Posted: Thu May 17, 2007 4:55 pm
by tsw
if you can wait for a week or two next version of news will have pagination.

rc1 will be released in day or two

Re: Problem with News Pagination

Posted: Tue May 22, 2007 3:51 pm
by kdallman
Please forgive my naivete but I see no mention of an upcoming version in the news module project info at the Forge. Where/how would I acquire the next version? Also the 1.1rc1 version of news does not seem to help me any more than v1.0.5. I'm afraid I am still rather lost. I'm sorry but could you give me more detail?

Re: Problem with News Pagination

Posted: Tue May 29, 2007 12:02 am
by RickMeasham
I've just updated the pagination code on the Wiki so it now works properly. The problem was when using a WYSIWYG editor.
http://wiki.cmsmadesimple.org/index.php ... fined_Tags

Re: Problem with News Pagination

Posted: Thu May 31, 2007 2:43 pm
by kdallman
I tried the new code posted and it now gives me appropriate pagination links but when clicked they do not change which posts are displayed. Also, I'm not using a WYSIWYG editor.