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?