Pixrael Posted October 13, 2017 Share Posted October 13, 2017 Hi guys! What do you think about something like this? Because I use this option regularly in the Windows File Explorer breadcrumb and it's very useful. The drop-down menu can display only published/visible child pages. I've tried to find how to do it as a module, but I'm not a coder with enough skills for that ... or I don't know if I can use hooks to do that ... 13 Link to comment Share on other sites More sharing options...
BitPoet Posted October 13, 2017 Share Posted October 13, 2017 Actually, that's quite similar to the breadcrumb dropdown I built for our new intranet layout, so I totally agree . I don't think there's a good place to hook into, but making AdminThemeUikit::renderBreadcrumb hookable shouldn't be too expensive. It might be worth adding a feature request in the issue tracker. 5 Link to comment Share on other sites More sharing options...
teppo Posted October 14, 2017 Share Posted October 14, 2017 Wouldn't mind having this feature in the core either. Just saying Admittedly my first impression was "oh man, not again". Some sites (Basecamp, Dropbox) have recently implemented their own flavors of "breadcrumb dropdowns", and in my opinion both get it wrong. In Basecamp clicking what seems like a link to the previous item actually opens a dropdown with that item and its children, while in Dropbox deeper down all but the last two levels are removed from the breadcrumbs and the first item turns into a dropdown. Both make sense in their own ways, but a) break the "open this link in a new tab" feature and b) are totally unexpected and confusing, at least to me. Your approach makes use of the spacer items, which not only makes more sense in this context, but also doesn't break the familiar breadcrumb pattern. Thumbs up for this 4 Link to comment Share on other sites More sharing options...
Noel Boss Posted October 26, 2017 Share Posted October 26, 2017 Great concept. Im not sure its obvious wnough to click on the arrows since these almost never have any functions associated eithout a more visual indication... in this regard i think a dropdown on a link would increase the usability for an average user. btw, what theme (opetions) arre you using here? Link to comment Share on other sites More sharing options...
Pixrael Posted October 27, 2017 Author Share Posted October 27, 2017 Good point about usability, maybe something like a outlined button could work. I would not like to replace the current link with a dropdown menu because it would be better to preserve the function of the current link and add the new function. The theme is the regular Reno that comes with PW installation, you can access it in the admin profile. 1 Link to comment Share on other sites More sharing options...
tpr Posted October 28, 2017 Share Posted October 28, 2017 Looks a bit too much for me, how about a dotted underline only? Link to comment Share on other sites More sharing options...
rick Posted October 28, 2017 Share Posted October 28, 2017 I would say keep the interface the same as other comboboxes for consistency. Adding sub-menu options to an existing breadcrumb is in effect a combobox. So why not change the breadcrumbs to a sequence of comboboxes separating each as you would normally. The visual ques remain the same for the user. Just a thought. Link to comment Share on other sites More sharing options...
BitPoet Posted November 8, 2017 Share Posted November 8, 2017 Ryan made AdminThemeUikit::renderBreadcrumbs hookable in the last update, so it's time to try out different ideas. 3 Link to comment Share on other sites More sharing options...
Noel Boss Posted June 6, 2018 Share Posted June 6, 2018 I use this hook to inject edit icons into the breadcrumb. Unfortunately the options exposed by $this->wire('breadcrumbs') are not great, no page id's etc… so it's kind of a hack… public function init() { wire()->addHookAfter('AdminThemeUikit::renderBreadcrumbs', $this, 'renderBreadcrumbs'); } /** * Render a list of breadcrumbs (list items), excluding the containing <ul>. * * @return string */ public function renderBreadcrumbs(HookEvent $event) { if (!$event->return) { return; } $process = $this->wire('page')->process; if ($process == 'ProcessPageList') { return ''; } $breadcrumbs = $this->wire('breadcrumbs'); $out = ''; // don't show breadcrumbs if only one of them (subjective) if (count($breadcrumbs) < 2 && $process != 'ProcessPageEdit') { return ''; } if (strpos($this->layout, 'sidenav') === false) { $out = '<li>'.$event->object->renderQuickTreeLink().'</li>'; } foreach ($breadcrumbs as $breadcrumb) { $title = $breadcrumb->get('titleMarkup'); if (!$title) { $title = $this->wire('sanitizer')->entities1($this->_($breadcrumb->title)); } $edit = ''; $icon = $event->object->renderIcon('pencil'); if (strpos($breadcrumb->url, 'open=') > 0) { $pageid = explode('open=', $breadcrumb->url); $pageid = end($pageid); if (wire('pages')->get($pageid)->editable()) { $edit = " <a href='../edit/?id=$pageid'>$icon</a>"; } } elseif (strpos($breadcrumb->url, '../') !== false && wire('process')) { $pageid = wire('process')->getPage()->parent->id; if (wire('pages')->get($pageid)->editable()) { $edit = " <a href='../edit/?id=$pageid'>$icon</a>"; } // modify open $breadcrumb->url = "../?open=$pageid"; } $out .= "<li><a href='$breadcrumb->url'>$title</a>$edit</li>"; } if ($out) { $out = "<ul class='uk-breadcrumb'>$out</ul>"; } $event->return = $out; } @ryan maybe this would be a useful addition to AdminThemeUikit? 3 Link to comment Share on other sites More sharing options...
Noel Boss Posted July 11, 2018 Share Posted July 11, 2018 I have implemented this breadcrumb in my new theme: Link to comment Share on other sites More sharing options...
Doug G Posted July 12, 2018 Share Posted July 12, 2018 Kinda OT, but thanks for posting this idea. I had no idea you could click the arrows in windows file explorer and get a dropdown! Learn something new every day. Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted July 12, 2018 Share Posted July 12, 2018 This is how it works in Bitrix, popular Russian proprietary CMS: 2 Link to comment Share on other sites More sharing options...
Robin S Posted July 18, 2018 Share Posted July 18, 2018 I released a module that adds dropdown menus to the breadcrumbs in Page Edit. 4 Link to comment Share on other sites More sharing options...
Gideon So Posted July 18, 2018 Share Posted July 18, 2018 WOW. It is great!! Gideon Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now