previous / next page only on sub-pages

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.
Locked
Brindle

previous / next page only on sub-pages

Post by Brindle »

Hi,

I've been trying to get cms_selflink to work on sub-pages. I have attempted to use the following code on my page, per a previous posting under this header:

i.e (in the first child):
{assign var='firstchild' value='1'}

and in the last child:
{assign var='lastchild' value='1'}

Then in my page template, I'd use:
{if !isset($firstchild)}{cms_selflink dir='prev'...}{/if}

and then
{if !isset($lastchild)}{cms_selflink dir='next'...}{/if}

Instead of the children, it is returning the parents, whether the code is placed on the template or the necessary page. Can anyone help me so that my selflink tags return the child only pages?

I appreciate any input and enjoy your day,
Brindle
Brindle

Re: previous / next page only on sub-pages

Post by Brindle »

Addendum:

I've discovered if "Show in Menu" is marked on the subpages, the child level shows up in the links instead of the parent - everything shows up appropriately. I do not want these particular links showing up in the main navigation, is there a way around this?

Thanks so much and enjoy your day,
Brindle
Locked

Return to “CMSMS Core”