Problem with News Pagination

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
kdallman
New Member
New Member
Posts: 5
Joined: Thu May 17, 2007 4:29 pm

Problem with News Pagination

Post 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.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm
Location: Finland

Re: Problem with News Pagination

Post 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
kdallman
New Member
New Member
Posts: 5
Joined: Thu May 17, 2007 4:29 pm

Re: Problem with News Pagination

Post 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?
RickMeasham

Re: Problem with News Pagination

Post 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
kdallman
New Member
New Member
Posts: 5
Joined: Thu May 17, 2007 4:29 pm

Re: Problem with News Pagination

Post 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.
Post Reply

Return to “CMSMS Core”