Exclude page from nav in hardcoded autonav

Hello together from Germany.
I am really thrilled by this CMS, it's brilliant and well modularly coded.
But as you can imagine, I have got some issues as a newbie to concrete5.
I hard coded the autonav in my template like this:
$bt_nav = BlockType::getByHandle('autonav');
$bt_nav->controller->displayPages = 'second_level';
$bt_nav->controller->orderBy = 'display_asc';
$bt_nav->controller->displaySubPages = 'none';

How can I possibly exclude a certain page from this autonav ?
I can't even find the attribute "exclude from nav" in the non-hard coded autonav (running concrete5
Is there anybody who can give me a hint ?

Thanks a lot in advance.


View Replies: View Best Answer
PatrickCassidy replied on at Permalink Reply
When you add your pages through the sitemap in dashboard, there is an option to exclude the page from the autonav in the properties for that page.
pureTest replied on at Permalink Reply
Hi PatrickCassidy.
Thanks for your answer.
Unfortunately, I don't have such an option, albeit I read about it in many places.
All I have is this:
Exclude From Page List
Exclude From Search Index
Exclude From sitemap.xml
Link not clickable
Exclude from Internationalization Copy

I wonder why I don't have this "exclude from nav" option, since I run the latest release.

Where can I find this option ?

Thanks again for a hint.

pureTest (aka noRiddle)
synlag replied on at Permalink Best Answer Reply

you can find the option at dashboard/pages/attributes/ under Navigation and Indexing.
If it's not there, you are able to add this attribute as checkbox with the handle 'exclude_nav' and it should work.
pureTest replied on at Permalink Reply
Hey synlag.
That did it, thanks a lot, was almost desperate not to be able to find this attribute in the list.
I had already created a new attribute "hide_from_nav" and added this to the view.php of autonav:

But why invent the wheel again ;-)

Thanks for your help,
really appreciate it.

pureTest (aka noRiddle)
synlag replied on at Permalink Reply
You're welcome, mark it at best answer, merci :)