2

I have a taxonomy tree with two levels.

When I am on a page at the second level, i.e., Sales & Management Training, breadcrumbs look like this

< Careers < Training Programs

But I only want to see the level immediately above the current page, which is:

< Training Programs

I don't see a way to do this built in the the Taxonomy breadcrumb tag.

3

I love when I answer my own question. Instead of the breadcrumbs tag, just use get_node: http://iain.co.nz/software/docs/taxonomy3-get-node

This lets you get information about the parent, which is all we need. It's like a single, elegant, delicious little breadcrumb.

{exp:taxonomy:get_node tree_id="2" entry_id="{entry_id}"}
    <a href="{this_parent_node_url}">< Back</a>
{/exp:taxonomy:get_node}
| improve this answer | |
1

You could use a conditionals with a single variable like node_level to determine what is shown:

{exp:taxonomy:breadcrumbs}
    {if node_level > 1}
        {if here}
            {node_title}
        {if:else}
            <a href="{node_url}">{node_title}</a> &rarr; 
        {/if}
    {/if}
{/exp:taxonomy:breadcrumbs}
| improve this answer | |
  • The problem is that if I'm at level 2, I need to show level 1, and if I'm at level 1, I need to show level 0 (the single, top-level entry). Make sense? – 4midori Nov 7 '13 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.