Code: Select all
{$cgsimple->get_sibling("prev","prev_sibling")}{if !empty($prev_sibling)}{cms_selflink page="$prev_sibling" text="Previous"}{/if}
<br>
{$cgsimple->get_sibling("next","next_sibling")}{if !empty($next_sibling)}{cms_selflink page="$next_sibling" text="Next"}{/if}
http://dronedog.com/index.php?page=album-page-1
What I am looking to do is have both the prev and next links remain visible on the first and last of the Level 2 sibling pages and link, respectively, the the last and first pages. I have an equivalent example of this working within the Album module. Here is the code:
Code: Select all
{if $link.picture.previous}<a href="{$link.picture.previous}" title="previous picture">< </a>{else}<a href="{$link.picture.last}">< </a>{/if}
picture {$picturenumber}/{$picturecount}
{if $link.picture.next}<a href="{$link.picture.next}" title="next picture"> ></a>{else}<a href="{$link.picture.first}"> ></a>{/if}
Secondly, is it possible to use simple smarty or something else to output the total number of Level 2 children of a particular parent page, and the position of the current page within that group of siblings? (ie page 2 of 3, etc)
I have managed to do this for the whole site (all pages), but this is no good, as the count and position output needs to be limited to just the Level 2 children of a given parent page (as opposed to all Level 2 pages)
thanks!