[Trac Ticket #21] ACP Breadcrumbs in 1.3

Posted by Will on 1259871017
After discussing with Phoenyx and his solution for a dirst fix for the lack of ACP breadcrumbs. We have concluded that this feature needs to be enhanced - and it needs to be done for 1.3 as the new ACP theme requires breadcrumbs to be working.

Here is the fix Phoenyx has come up with so far.

function displayAdminMenu($currentoption = 0, $breadcrumb = '', $submenus = false, $currentsub = -1) [line 277]

before the function is closed add
global $icmsAdminTpl; $icmsAdminTpl->assign('breadcrumb', $breadcrumb);

This will pass the breadcrumbs that the module declares - however - this does nothing if the adminmenu is not constructed with IPF, and as it stands the modules menus that are being constructed with IPF are only passing the current pagename - which is fine. However - all of the system pages are only passing the term "System" as the pagetitle, so my current approach is lacking any real depth.

I heartily believe that system pages should pass a legitimate pagetitle. so if you are in Version Checker - the pagetitle should be Version Checker and not just System.

Anyway - here is the constructor for the breadcrumbs I have assembled in the template.

<a href="<{$icms_url}>/admin.php">ACP Home</a> <span style="margin: 0px 4px;">></span> <{if $icms_dirname != 'system'}><a href="../"><{$icms_dirname}></a> <{if $breadcrumb != ''}><span style="margin: 0px 4px;">></span> <strong><{$breadcrumb}></strong><{/if}><{else}><strong><{$icms_pagetitle}><{/if}>

Now as you can see - I am checking against the active directory being system - which is the only way I could think of to assure that the pagetitle was not always being displayed for system pages - the issue here is that modules make use of the system module for a lot of their config pages... which means that the breadcrumb is going to report false information regarding the actual steps taken to reach the current page from the ACP Index.

Solution: no idea - ideally <{$breadcrumb}> should automatically be generating an actual breadcrumb trail without having to <{if/else/fake}> it.


I have opened a ticket for this issue. [t:852]

This Post was from: https://www.impresscms.org/iforum/viewtopic.php?topic_id=3843&post_id=34811