I am using path auto and my content is referenced by paths such as

example.com/content/level-1
example.com/content/level-1/level-2
example.com/content/level-1/level-2/level-3

How can I use you module to dynamically generate breadcrumb trails that are based on node path?

eg Home > Level-1 > Level-2 > Level-3 etc.

Thanks

Comments

MGN’s picture

If you use the arg tokens (patch for the tokenSTARTER module available at http://drupal.org/node/273893#comment-1747188), then it is straightforward:

Enable the custom breadcrumbs module and create a node-type breadcrumb for the node type this breadcrumb should apply to. For titles and paths use

Titles
[arg1]
[arg2]
[arg3]
...

Paths
content/[arg1]
content/[arg1]/[arg2]
content/[arg1]/[arg2]/[arg3]
....

If the nodes are menu items, then I think you should also be able to do this with [menupath] tokens. I haven't tried it so I am not sure.

Hope this helps!

eft’s picture

Michael,

Thanks for getting back to me with that suggestion.

In the meantime I've been trying to get the module working based on menu paths. However, all my attempts to use [menupath] result in the full path without a breadcrumb separator. How can I use your module to break down the path to show parent menu links within the breadcrumb?

MGN’s picture

The [arg0], [arg1], [arg2] tokens provide the individual arguments of the url.

Custom breadcrumbs itself can use the values returned by tokens to set the breadcrumb for the node types that you specify (also for views, panels, taxononmy terms/vocabularies, or exact paths - through various submodules that you can enable). But custom breadcrumbs doesn't create these tokens, it relies on other contrib modules to provide those. You can also create your own following the model provided in the tokenSTARTER module. The tokens are essentially placeholders for php code which is dynamically evaluated when the page is viewed (in this case).

MGN’s picture

Status: Active » Fixed

changing status to fixed because the question was answered and there hasn't been any followup for several weeks.

eft’s picture

Sorry Michael - my bad manners for not thanking you for your last response.

MGN’s picture

Thanks eft. I didn't consider it to be bad manners...just cleaning up the issue queue. Feel free to change the status if there is more to be done on this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gmclelland’s picture

Status: Closed (fixed) » Active

Is there any way that you can prefix a breadcrumb trail and then list the menu path based breadcrumbs after it?

Ex. Say my menu structure looks like this:

Home->Finance Department
Home->HR Department
Home->HR Department->Apply for a job
Home->HR Department->Apply for a job->Applications

Is there any way to get breadcrumbs that show:
Home->Departments->HR Department->Apply for a job->Applications

Notice how I prefixed the breadcrumb with the word "Departments."

When I try this with a custom breadcrumb it works, but then it fails to show the rest of the breadcrumb trail as reflected in the menu path. It would only show Home->Departments->HR Departments

I have follow menu path checked in the custom breadcrumbs settings.

If this is not possible, perhaps you could add a prefix and suffix option to the custom breadcrumbs?

MGN’s picture

Status: Active » Closed (fixed)

@gmclelland, lets follow up with this at #687512: Is splitting [menupath] token into indvidual breadcrumbs possible? - even though your reqeust was first. It will be easier for me to keep things organized this way since you already have a link back to this issue.