Forum
Passing perch_pages_navigation result in to content region (including template)
Is there anyway of passing the results (including template) of a perch_pages_navigation call through to a content region? Something like this…
$office_space_links = perch_pages_navigation(array(
'from-path' => '/office-space',
'template' => 'item.html',
'levels' => 1
), true);
PerchSystem::set_var('office_space_link',$office_space_links);
and then in content region <perch:content id=“office_space_link”>
dhmax88 [10:35 AM] (will post to support forum too)
… can’t get it to output HTML, instead getting this…
<ul class="nav nav--dropdown-list nav--stacked">
<li class="nav__item ">
<a href="/the-foundry">The Foundry</a>
</li>
</ul>
What's wrong with what you're getting?
ah sorry – i'm getting this output when including <perch:content id="office_space_link"> in my content region ...(the forum converted the encoded html)
So the result is being outputting to my page as a string by the looks of things.
Add
encode="false"
to your template tag.Har diggidy! I was so close...
Thank you Drew.