cms selflink - dir='next' and 'prev' [solved-ish]

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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: cms selflink - possible bug with dir='next' and 'previou

Post by Dr.CSS »

The first one is not correct, previous not prev, the next is ok except the last part after }, read the tags Help page for a better understanding of what it does...

Or look at some of the default templates...
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: cms selflink - possible bug with dir='next' and 'previou

Post by paulbaker »

johnboyuk wrote:but neither are working correctly for me ... has anyone tried these in the latest version of cmsms?
I added

Code: Select all

{cms_selflink dir='prev' text='prev'}

{cms_selflink dir='next' text='next'}
in a Page of a 1.11.11 site (latest) and got the expected behaviour - links to previous and next pages (in the order as as listed on Pages admin page).

Where are you adding your tags (Page or Template (head or body))? And when you say "neither are working correctly for me" what HTML is produced?
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: cms selflink - dir='next' and 'prev' [solved-ish]

Post by paulbaker »

You're welcome.

One solution to that is making the pages show in menu but changing your menu template to ignore them - like this which hides page "aboutus" (untested code):

Code: Select all

{foreach from=$nodelist item=node}
{if $node->alias != "aboutus"}

...all the existing code here...

{/if}
{/foreach}
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Post Reply

Return to “CMSMS Core”