I wish to show pages in my menu if they are made with certain templates. I have it working for a single template, How do I do it for 2 templates?
Current working code:
<ul>
<?php $infopages = $site->children()->listed()->template('information');?>
<?php foreach ($infopages as $infopage): ?>
<li><a href="<?= $infopage->url() ?>"><?= $infopage->title() ?></a></li>
<?php endforeach ?>
</ul>
I want to include pages from my ‘about’ template too. How do I include this in the above code?
I feel it should be something like this:
<ul>
<?php $infopages = $site->children()->listed()->template('information' or 'about');?>
<?php foreach ($infopages as $infopage): ?>
<li><a href="<?= $infopage->url() ?>"><?= $infopage->title() ?></a></li>
<?php endforeach ?>
</ul>
Any guidance would be appreciated