We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Structure Nav - How to create breadcrumbs from same entry in multiple areas of nav tree

How Do I?

Torch's avatar
Torch
40 posts
2 weeks ago
Torch's avatar Torch

I’d like to have the same entry in multiple parts of my Structure navigation tree, specifically so i can easily create Structure breadcrumbs. I know this isn’t possible using structure, but wondering if there’s some type of workaround.

Here’s the scenario: -Join – Find a Location -Hire –Find a Location

I’d like “Find a Location” to appear under both nav items when building out my Structure nav. Not really a huge issue because i can create 1 entry for Find a Location then just hardcode it additionally in my Structure nav, or add it as a “external” link in Structure. The problem is building out breadcrumbs on those pages: Home > Join > Find a Location Home > Hire > Find a Location

Depending how the user got to the page, i want the parent item to still be relevant to the path they took to get there. Two different user journeys, same end result page to land on “Find a Location.”

       
Tom Jaeger's avatar
Tom Jaeger
449 posts
2 weeks ago
Tom Jaeger's avatar Tom Jaeger

Hi Torch,

Great question this is actually a place where many people use the structure field type. They just create an entry and then choose entry that they really want to link to from the structure field type. This allows you to avoid duplicate content by redirecting them to the entry that was chosen, but still have the item in the navigation where you want it.

Does that make sense?

Thanks,

-Tom Jaeger

       
Torch's avatar
Torch
40 posts
2 weeks ago
Torch's avatar Torch

Hi Tom,

I didn’t know that existed, but I see it now as an option when creating a field type for a field. Is there any documentation for this particular approach? I can’t seem to find anything.

Thanks!

       
Tom Jaeger's avatar
Tom Jaeger
449 posts
2 weeks ago
Tom Jaeger's avatar Tom Jaeger

Hi Torch,

Hrmm… yeah it seems there’s a gap in documentation around this…. The basic idea is that you create a redirect tempalte, and pass the variable into the standard redirect tag

{redirect='{structure_field}' status_code="301"}

The field short name in a template will return the URL for the page chosen)

       
Torch's avatar
Torch
40 posts
one week ago
Torch's avatar Torch

Not sure if i’m doing this correctly, i have a channel “Page” that has a Structure URL field type in the entry called “structure_redirect.” When i assign the entry to another structure url, and the entry is set to this template, it doesn’t redirect:

{if structure_redirect}
{redirect="{structure_redirect}"}
{if:else}
    {page_content}
{/exp:channel:entries}
{/if}
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.