Sorry, this page is only available in one language

ParentPage

Suggested dropletname: ParentPage

Published by: Dev4me

A droplet to show the parenpage of the current page (if any)

$info = show_menu2(0, SM2_CURR, SM2_START, SM2_ALL|SM2_BUFFER, '[if(class==menu-current){[level] [sib] [sibCount] [parent]}]', '', '', '');
list($nLevel, $nSib, $nSibCount, $nParent) = explode(' ', $info);
if ($nLevel > 0) {
        $lev = $nLevel - 1;
        return show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB|SM2_BUFFER, "[if(level==$lev){[a][menu_title]</a>}]", '', '', '');
}
else 
        return '(no parent)';

If you don't want to show anything if there is no parent page, replace the last line in return true; 



« Previous droplet | Overview | Next droplet »