Page 1 of 1

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

Posted: Fri Dec 12, 2014 6:30 pm
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...

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

Posted: Sun Dec 14, 2014 12:50 am
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?

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

Posted: Sun Dec 14, 2014 10:55 pm
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}