Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49208

Found: Breadcrumbs in Page Manager. Wanted: Another plugin level

$
0
0

There are quite a few breadcrumb modules out there, so it is legitimate to wonder why on earth it would be a good idea to write a new module to handle breadcrumbs within Page Manager. This is why I eventually decided on doing just this in a project I'm working on:

  • The most flexible breadcrumbs modules (such as Custom Breadcrumbs 2) does not support configuration export, which was crucial for the project at hand.
  • The only exportable breadcrumbs modules I found supports breadcrumbs only for certain path types (such as for nodes).
  • I really like the concepts of Page Manager and Panels.

Ideally, I would like to have Page Manager have a section where you can enter plugin-enabled actions – but I have so far not found a way of adding a CTools plugin at that level (this being my first CTool plugin ever). Instead I have used the access rules to write an action that sets a breadcrumb without affecting the actual access outcome.

It would be much neater (and less of a hack) if this could be run as a clean action, not expected to change access/variant selection/visibility rules.
Does anyone know if it is possible to add plugins on this level? What I'm after is basically a new tab, like the access or menu, and also subtask like selection rule or context.

I've gotten as far as the page_manager_page_build_subtask function, but can't see how it could be hooked into. If someone with more experience in the CTools framework could give me a nudge in the right direction it would be much appreciated.

If anyone is interested in the breadcrumb code, it is attached below.

Cheers!
//Johan Falk, NodeOne, Sweden

AttachmentSize
pm_breadcrumb.zip_.txt3.68 KB

Viewing all articles
Browse latest Browse all 49208

Trending Articles