0

I'm trying to create a navigation menu inside an embed, I have the following code in my main template:

{exp:structure:entries parent_id="{structure:page:entry_id}"}
  {if channel_short_name == "accordion"}
  {embed="site/template_accordian"}
  {/if}
  {if channel_short_name == "album"}
  {embed="site/template_album"}
  {/if}
{/exp:structure:entries}

This works great, however I then have the following inside template_accordian:

<nav id="primary-nav">
  <ul>
    {exp:structure:entries parent_id="{structure:parent:entry_id}"}
    <li><a href="#{url_title}">{title}</a></li>
    {/exp:structure:entries}
  </ul>
</nav>

{structure:parent:entry_id} doesn't seem to output anything, I'm guessing this is due to parsing order or something but can't work out how to achieve what I want to achieve, any ideas?

1
  • You shouldn't need an embed when you're using structure. Is there a reason why you need to do this? What are you trying to achieve that using the structure tag isn't letting you? Commented Mar 20, 2014 at 14:51

1 Answer 1

0

I don't know if it will work within that embed because of EE's parsing order. You may need to put it directly in the template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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