The 404 module has received a security update for any version below v1.6!
If you are using this module on your website you are advised to upgrade the module as soon as possible!

Sorry, this page is only available in one language


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>}]", '', '', '');
        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 »