How do I create a previous and next links for sub pages please

General project discussion. NOT for help questions.
Post Reply
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How do I create a previous and next links for sub pages please

Post by Dr.CSS »

I believe if you have pages set to not show in menu they won't show in next/prev. you may have them set this way to not have them show in top menu but it may be better to set them to show in menu then set menu to number_of_levels='1' so it only shows top level menu items...
allan1412
Forum Members
Forum Members
Posts: 24
Joined: Wed May 21, 2008 9:14 pm

Re: How do I create a previous and next links for sub pages please

Post by allan1412 »

Have you tried using the CGSimpleSmarty module and something like:

{$cgsimple->get_sibling("prev","prev_sibling")}
{if !empty($prev_sibling)}
{cms_selflink page="$prev_sibling" text="Previous"}  {/if}

{$cgsimple->get_sibling("next","next_sibling")}
{if !empty($next_sibling)}
{cms_selflink page="$next_sibling" text="Next"}{/if}
Post Reply

Return to “General Discussion”