Forum
Is it possible to limit the number of navigation items output?
I'd like to limit the number of top level navigation items.
I'd also like to only limit them by template e.g. I want to limit the amount of header items in the header, but the footer navigation items should not have this restriction.
Is this possible?
You'd create a navigation group and hand-select the items you want to be included in that group.
OK, I understand that, but this is more to prevent the user getting trigger happy.
From your answer, I'm presuming this is not possible? I'll find a way around if not, but wanted to check I wasn't missing something.
It's always possible. You can test for the current
perch_item_index
in the template and only output the link if it's below your chosen threshold.For anyone looking for the solution, it would be something like this: