I'm planning on using panel pages to override the standard drupal display of nodes (using the node/% method described in the handbook) to take advantage of the fantastic opportunities the panels 2 context gives me.
But breadcrumbs are giving me a headache.
Before I decided to go down the panels road I had the custom breadcrumbs module set up to create breadcrumbs according to content type. But as panel pages overrides the node display, node/1234 is no longer a node, it is a panel page and thus custom breadcrumbs can no longer do its job.
I have tried setting up Workflow NG to do the job, but I have not successfully managed to trigger by content type (once again, it is no longer a node, it is a panel page).
Any advice will be very much appreciated
Comments
Comment #1
ramriot commentedI'm Having this issue too, I tried using a workflow_ng configuration with custom PHP as the filter. The normal global URL variable was blank so that did not work.
What would be most useful is for someone to list what is in the Variable stack for a panel that can be used as a trigger, for some reason I cannot get Devel to show me them in a panel.
i.e. What variable do we need to make global in custom PHP to grab the name of the Panel.
Comment #2
Vidarls commentedI found a solution using workflow_ng and path_auto:
I'm using path_auto to create paths for my nodes i.e.: knowledge/questions/title-of-question.html
I then use workflow ng to create breadcrumbs based on that path:
In my case "knowledge/questions".
Resulting regex: knowledge\/questions\/.+
This works for my needs in this particular case, but it is not as flexible as custom breadcrumbs.
I would really like to see native breadcrumb support by panels, perhaps using variables from the context, so I'm changing this issue to a feature request.
Comment #3
Blueeeeie commentedHi,
I'm really bad at regular expressions and I was wondering how would you modify your textual comparison condition if I wanted to match URLS like "category/$arg/products" where $arg is actually any taxonomy term.
I tried "category\/.+\/products" but it didn't work so I'm guessing something's wrong with my regular expression.
Would appreciate any help.
regards,
Jamie
Comment #4
sdboyer commentedSome kind of native breadcrumb support is an interesting idea, to be sure, but it's definitely not something the Panels devs have time for right now. I'd certainly consider a patch.
Comment #5
Vidarls commented@Blueeeeie:
I don't speak regex fluently either, what I usually do is to test my regex in a regex enabled editor (ie notepad++) using the regular expression function in the search and replace tool to test my regex.
Allso It can be useful to create a workflow-ng rule that prints the [user:url] (or whatever path token you use) as a message to get the raw data you need to apply your regex to.
Comment #6
zach harkey commentedThe lack of breadcrumb support seems to have something to do with the way panels strips the $title out of the node.
Comment #7
Vidarls commentedI've found now that if I display only one node (using node/% override), and select "node page" in the add node content dialog, the custom breadcrumbs module actually works. Custom breadcrumbs is a lot easier to use than the workflow-ng breadcrumb capability.
Comment #8
giorgio79 commentedWhat custom breadcrumbs module you refer to?
I user Taxonomy Breadcrumbs and it does not display for me on panels pages...
Comment #9
Vidarls commentedThe module named "custom breadcrumbs" (http://drupal.org/project/custom_breadcrumbs)
:-D
Comment #10
zach harkey commentedVidar, what do you mean "display only one node (using node/% override)"?
Comment #11
steveoliver commentedThank you for your Workflow-ng approach. It works great! Thanks,
-Steve
Comment #12
aschiwi commentedCould someone post a screenshot of the workflow-ng settings Vidar was talking about in comment #2? I seem to be missing something in the settings and I can't get it to work. Also, if i put [user:url] in the top line then i only get user related replacement patterns but that wouldnt make any sense for panel breadcrumbs right?
Comment #13
Vidarls commented[user:url] is the current active url. Try the tricks mentioned above, choose user is going to view a page as trigger and visit different pages on your site to see how it workss.
Comment #14
aschiwi commentedoh man, the thing i was missing was to check the checkbox "Evaluate text2 as a regular expression."
thank you for your help.
Comment #15
remtheory commentedWow, excellent instruction and so helpful. Worked perfectly. Thank you!
Comment #16
remtheory commentedOh I spoke too soon. It worked perfectly as long as I was logged in. I understand now that the logic is that you have to be a user, but it doesn't seem to take hold if the user is anonymous. Can anyone help with that? I couldn't figure it out.
Comment #17
patchak commentedI tried to setup what you describe here, (publishing node as a page) on a panel page override, and I still don't see the breadcrumbs...you have done anything else to make it work??
thanks,
Patchak
Comment #18
rc2020 commentedsubscribing
Comment #19
yrre7 commentedsubscribing
Comment #20
Blueeeeie commentedThe reason why the regular expressions method that Vidar mentioned doesn't work for users that aren't logged in is because the event "user is going to view a page" or "Content is going to be viewed" won't work if page cache is enabled. You'll have to turn page caching off if you want this method to work.. but its not advisable since it affects the performance of your site especially if you're running it in production.
I found another workaround tho...
Just insert a snippet of php code that will run on the page itself to manually set the breadcrumbs link. You can go to http://drupal.org/node/319857 to read more.
Hope this helps.
Comment #21
sunMarking as duplicate of #194415: Attach more detailed breadcrumb-like information on the panel pane title