Recommended Posts

Breadcrumb Dropdowns

Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.

bd

Installation

Install the Breadcrumb Dropdowns module. The module requires ProcessWire >= v3.0.83 and AdminThemeUikit.

There is a checkbox option in the module config that determines if the breadcrumb dropdowns will include pages that the user does not have permission to edit.

Features/details

  • The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages.
  • In the dropdown menus the current page and the current page's parents are highlighted in a crimson colour to make it easier to quickly locate them in case you want to edit the next or previous sibling page.
  • Unpublished and hidden pages are indicated in the dropdowns with similar styling to that used in Page List.
  • If the option to include uneditable pages is selected then those pages are indicated by italics with a reduced text opacity and the "not-allowed" cursor is shown on hover.
  • There is a limit of 25 pages per dropdown for performance reasons and to avoid the dropdown becoming unwieldy.
  • If the current user is allowed to add new pages under the parent page an "Add New" link is shown at the bottom of the breadcrumb dropdown.
  • If the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link.

Overriding the listed siblings for a page

If you want to override the siblings that are listed in the dropdowns you can hook the BreadcrumbDropdowns::getSiblingsmethod and change the returned PageArray. For most use cases this won't be necessary.

Incompatibilities

This module replaces the AdminThemeUikit::renderBreadcrumbs method so will potentially be incompatible with other modules that hook the same method.

 

https://modules.processwire.com/modules/breadcrumb-dropdowns/
https://github.com/Toutouwai/BreadcrumbDropdowns

  • Like 10

Share this post


Link to post
Share on other sites

Looks awesome, but just got this on attempting to install:

image.thumb.png.f3d8021d5a85161144fdc1225d73e3f0.png

  • Like 1

Share this post


Link to post
Share on other sites
'requires' => 'ProcessWire>=3.0.83, AdminThemeUikit',

 

  • Like 1

Share this post


Link to post
Share on other sites

I see you have a limit=25 which is a great idea, but I am wondering whether it would also make sense to order by modified date descending? I am just thinking about blog siblings as an example.

Share this post


Link to post
Share on other sites

Fatal error: Uncaught Error: Call to a member function siblings() on null in C:\inetpub\wwwroot\site\modules\BreadcrumbDropdowns\BreadcrumbDropdowns.module:97

This happen if you have AdminThemeBoss module installed (https://github.com/noelboss/AdminThemeBoss)

Share this post


Link to post
Share on other sites
56 minutes ago, adrian said:

Looks awesome, but just got this on attempting to install

Hmm, it's installing as expected here. The "requires" setting I've used looks like it conforms to the example given in the Module documentation. Any ideas why it might not be working in your case?

16 minutes ago, adrian said:

I see you have a limit=25 which is a great idea, but I am wondering whether it would also make sense to order by modified date descending? I am just thinking about blog siblings as an example.

I use the "AddNewChildFirst" option in AdminOnSteroids for blog/news items and the dropdowns work well with that. But I get your point and will look at implementing something that honours the "sort settings for children" on the parent page/template. And add a note to the readme about the 25 item limit.

 

19 minutes ago, matjazp said:

This happen if you have AdminThemeBoss module installed (https://github.com/noelboss/AdminThemeBoss)

Yes, very likely will not be compatible with that module as AdminThemeBoss already modifies the breadcrumbs.

  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, Robin S said:

But I get your point and will look at implementing something that honours the "sort settings for children" on the parent page/template.

@adrian, it seems that the $page->siblings() method used in the module already sorts by the sort field defined on the parent page or template. Do you have that set for your blog items parent?

  • Like 1

Share this post


Link to post
Share on other sites

Is the module using Ajax or adds the dropdowns to the markup in advance?

Share this post


Link to post
Share on other sites
2 minutes ago, tpr said:

Is the module using Ajax or adds the dropdowns to the markup in advance?

There's no AJAX involved - unless you had a crazy number of parents the number of pages rendered in the menus isn't that many and it's better to have the dropdowns appear instantly I think.

Share this post


Link to post
Share on other sites
1 minute ago, Robin S said:

@adrian, it seems that the $page->siblings() method used in the module already sorts by the sort field defined on the parent page or template. Do you have that set for your blog items parent?

Sorry, I didn't actually test it on a blog page tree - it was more of a theoretical question/consideration. So long as siblings() sorts automatically everything should be good.

 

24 minutes ago, Robin S said:

Hmm, it's installing as expected here. The "requires" setting I've used looks like it conforms to the example given in the Module documentation. Any ideas why it might not be working in your case?

This is weird - it has that error when installing it via class name, but it works fine when installing from an uploaded zip. Can you reproduce the issue when installing via class name?

Share this post


Link to post
Share on other sites
5 minutes ago, adrian said:

This is weird - it has that error when installing it via class name, but it works fine when installing from an uploaded zip. Can you reproduce the issue when installing via class name?

FYI, Got the same error when installing via class name.

  • Like 1

Share this post


Link to post
Share on other sites
29 minutes ago, adrian said:

This is weird - it has that error when installing it via class name, but it works fine when installing from an uploaded zip. Can you reproduce the issue when installing via class name?

Yes, it is weird. I think it must be an issue with the modules directory as the "requires" condition looks legit to me. I remember @Macrura struck something like this before with his Selectize modules - maybe he knows more about it?

For now I've removed the entire "requires" condition so the module is at least installable by classname from the directory. Will raise a GitHub issue on the PW repo if it's looking like it is a definite bug with the modules directory.

  • Like 2

Share this post


Link to post
Share on other sites

@Robin S 'requires' => 'ProcessWire>=3.0.83, AdminThemeUikit' doesn't work for you?

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, matjazp said:

'requires' => 'ProcessWire>=3.0.83, AdminThemeUikit' doesn't work for you?

Ah, yes, that does work. Thanks, I didn't realise your earlier comment was a suggestion to change to the string syntax.

I will raise an issue for Ryan to take a look at as the array syntax is the one that's shown in the documentation example.

Share this post


Link to post
Share on other sites

Nice work @Robin S thanks you.

 

Just saying, it works on my side with AdminThemeBoss 😊

 

bc.png.a4850c9d364db6c4d7b46f3f24b7cc9b.png

  • Like 2

Share this post


Link to post
Share on other sites

Great module! I'm working on compatibility with AdminThemeBoss.

I'd suggest adding the following css, because the default theme has a font-size on <a> inside the breadcrumb:

.uk-breadcrumb  >li {
        font-size: .875rem;

}

I personally would not even include the title because it's there twice with the page title…

Also, I get an error when clicking on the arrow after the tree and then the root page:

1058662691_ScreenShot2018-07-18at11_47_25.thumb.png.ff272e33ca95dd0a25dc191b9d3ed009.png

  • Like 2

Share this post


Link to post
Share on other sites
25 minutes ago, Noel Boss said:

I'd suggest adding the following css, because the default theme has a font-size on <a> inside the breadcrumb of 0.825rem

Good spotting, thanks.

26 minutes ago, Noel Boss said:

I personally would not event include the title because it's there twice with the page title

That's explained in the readme:

Quote

The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages.

 

26 minutes ago, Noel Boss said:

Also, I get an error when clicking on the arrow after the tree and then the root page

Thanks, should be fixed in v0.1.1. The Home page is a special case that the module should leave alone because the Home page has no siblings to appear in a dropdown. I'm thinking that this is the error that @matjazp mentioned earlier, which actually isn't related to AdminThemeBoss. Although the modules are probably still incompatible if the "extended breadcrumb" option is activated in AdminThemeBoss.

Share this post


Link to post
Share on other sites
1 minute ago, Robin S said:

The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages.

Just my suggestion: Display the dropdown on hover over the elements … consistent behaviour like the top menu, then you don't even need the triangles anymore and also not the last item…

Share this post


Link to post
Share on other sites
3 minutes ago, Noel Boss said:

Display the dropdown on hover over the elements

Make that optional in module config, I personally prefer to click 😅

  • Like 3

Share this post


Link to post
Share on other sites
3 minutes ago, Noel Boss said:

Display the dropdown on hover over the elements

I did consider that but decided that show on click is preferrable and I'll stick with that. The original request that inspired this module references the Windows Explorer behaviour that shows dropdowns on click, and I wouldn't want to see menus flying out if my mouse happens to pass over the breadcrumb on the way to the main menu.

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Robin S said:

I'll stick with that

Please again consider this change. It would also allow you to add a dropdown for the children of the currently edited page (the one I suggested to remove 😉 ).  You could add a slight delay for the hover – this way one gets not distracted.

To add visual clarity to the behaviour one could turn the angle down – if preferred, one can keep the click target to these angles:

908605726_ScreenShot2018-07-18at14_22_43.png.24c65ad7b129ad8babe44c98a3fab38c.png

  • Like 1

Share this post


Link to post
Share on other sites
On 7/18/2018 at 6:28 AM, flydev said:

Make that optional in module config, I personally prefer to click 😅

I agree ... more than a preference, I think it's mandatory due to touch screen devices without pointers.. maybe the optional is add or not the hover effect

  • Like 1

Share this post


Link to post
Share on other sites

Hey @Robin S - could you please take a look at this? I am seeing it if I try to edit a page that I don't have permission to edit. I am using AdminRestrictBranch, but I expect it might happen regardless of this. Let me know if you need any help reproducing. Thanks!

image.thumb.png.bc22a18766790ec0e613f87530d44e10.png

  • Like 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By horst
      Croppable Image 3
      for PW 3.0.20+
      Module Version 1.1.16
      Sponsored by http://dreikon.de/, many thanks Timo & Niko!
      You can get it in the modules directory!
      Please refer to the readme on github for instructions.
       
      -------------------------------------------------------------------------
       
      Updating from prior versions:
       
      Updating from Croppable Image 3 with versions prior to 1.1.7, please do this as a one time step:
      In the PW Admin, go to side -> modules -> new, use "install via ClassName" and use CroppableImage3 for the Module Class Name. This will update your existing CroppableImage3 module sub directory, even if it is called a new install. After that, the module will be recogniced by the PW updater module, what makes it a lot easier on further updates.
      -------------------------------------------------------------------------
       
      For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here.
       
      -------------------------------------------------------------------------
       
    • By MoritzLost
      UPDATE: I have published a stable version of this module!
      Discussion thread:
      Github: https://github.com/MoritzLost/TextformatterPageTitleLinks
      ---
      Hello there,
      I'm working on a tiny textformatter module that searches the text for titles of other pages on your site and creates hyperlinks to them. I'm not sure if something like this exists already, but I haven't found anything in the module directory, so I wrote my own solution 🙂
      It's not properly tested yet and is still missing some functionality I would like to implement, so at the moment it should be considered in BETA. Features include limiting the pages that will get searched by template, and adding a custom CSS class to the generated hyperlinks. As I'm writing this I noticed that it will probably include unpublished and hidden pages at the moment, so yeah ... it's still in development alright 😅
      You can download the module from Github:
      https://github.com/MoritzLost/TextformatterPageTitleLinks
      There's some more information in the readme as well.
      Anyway, let me know what you think! I'm happy about any feedback, possible improvements or ideas on how to improve the module. Cheers.
    • By benbyf
      I always seem to get this warning on every new install of PW on my Ubuntu 14 box with Digital Ocean. The servers are usually based in the UK and I was wondering if I should be adding something other than the below in the config? Is there a UK based locale code? Quick Google didnt come up with much.
      Warning: your server locale is undefined and may cause issues. Please add this to /site/config.php file (adjust “en_US.UTF-8” as needed): setlocale(LC_ALL,'en_US.UTF-8');
      Added to the config file:
      setlocale(LC_ALL,'en_US.UTF-8');  
    • By blad
      Hi guys!
      I just uploaded a module to explore files based on elFinder. By default it will show the "Files" folder.
      Screenshots:

      Video:
       
      To do:
       More options To fix:
       The function of rotating or scaling an image fails  Image editors V 1.01 (view issue)
      Fixed the bug working with the Multi-Language support ( translation of folders ). Fixed the name of elfinder.en  Github:
      https://github.com/LuisSantiago/ProcessElFinder/
      I hope you like it.