Im trying to build a dynamic menu to create a list of pages per tag. Is working fine except I don't know how to get the page url populated:
<section class="see-also">
{{#each tags}}
<p>In <span class="tag">{{tag}}</span>:</p>
{{#each pages}}
<li><a href="#">{{data.title}}</a>{{pages.url}}</li>
{{/each}}
{{/each}}
</section>
Any suggestions?
@luis-martins you should be able to use the relative helper with the destination from the current page being rendered and the destination from the current page in the
tags.pages
collection like this to generate a relative url:Notice that to the the destination of the current page being rendered, you have to use the parent syntax from handlebars:
../../page.dest
. Also thedest
property is on the current page item from thetags.pages
collection.Hope this helps.