Hello,
I’m trying to deal with tags to categorize some content (I maybe should have done things diferently before…)
I’ve a page with subpages. All subpages have some tags witch are displayed in an aside nav.
There are 2 of these tags I would need to show (correctly) in all subpages. Here is an exemple :
<?php if($page->parents()->find('collections')): ?>
<nav class="nav">
<h3>Tags:</h3>
<ul>
<?php foreach(str::split($page->tags()) as $tag): ?>
<li>
<a href="<?php echo url('collections/' . url::paramsToString(['cat' => $tag])) ?>">#<?php echo $tag; ?></a>
</li>
<?php endforeach ?>
</ul>
</nav>
<nav class="nav">
<h3>Catégorie:</h3>
<ul>
<li>
<a href="<?php echo url('collections/cat;tag1') ?>">#tag1</a>
</li>
<li>
<a href="<?php echo url('collections/cat;tag2') ?>">#tag2</a>
</li>
</ul>
</nav>
<?php endif; ?>
Thank you for your help,