Forum
Dynamic Navgroup?
I have this in my page template (below). Is it possible to make the 'navgroup' => 'navgroup choosen in backend?' to display only pages link that are in the navgroup? Instead of creating different page templates.
<?php
perch_pages_navigation(
array(
'navgroup' => 'bohol',
'template' => 'navgroup.html',
'from-path' => '/'
));
?>
Hello Edward,
It's not 100% clear what you are asking, but it sounds like you don't want to hardocde the value of
navgroup
?The value can be dynamic. You can add it however you want. For example:
Content region:
Page attribute:
Thank you for the replay. Yes, I don't want to hardcode the navgroup value.
How can I give a custom template below? So I don't have to select a template everytime. Perhaps a dropdown select option?
It's up to you how you want to set it up. You can provide a single text field and enter the text manually. Or use a single
select
field.On your page you'd need:
And in your template you can use a
select
:OK. Thanks Hussein.