Header nav vs auto nav

Permalink
Hello everyone and thanks in advance... these forums are priceless!
I'm working on a site for a client and he wants to have a site map page included - like the page is called "search" and then I put in both a search bar as well as an auto nav block. Well he wants to have one particular page appear in the auto nav block list but NOT in the header nav at the top.... no matter what I try I seem to only be able to have it in both or not at all, but never ONLY in the auto nav. For instance, the Exclude Nav attribute takes it out of everything.
I've read a bunch of stuff on here and haven't come across anyone with the same problem (usually it is the opposite).
I don't know what kind of coding would be helpful in figuring this out, so if you need to me to post something let me know.
Thanks again!
~Kari

calicomoose
 
12345j replied on at Permalink Reply
12345j
maybe for the header nav set it to only show featured pages, and apply that to all pages except the page you don't want displayed, and for the other just keep it as is.
calicomoose replied on at Permalink Reply
calicomoose
Thanks for your reply.
Hmm... That sounds like it would be an acceptable fix for me, but I'm not seeing a way to set the header nav to featured only. I saw that option in "page list" though (page lists don't seem to work for me in general how the auto-nav does).
Is there an easy way to make the header show only featured? Thanks!
jordanlev replied on at Permalink Reply
jordanlev
You need to override the template for the autonav block. Try this:

1) create a new folder on your server here:
/YOURSITE/blocks/autonav/templates/


2) Copy this file:
/YOURSITE/concrete/blocks/autonav/templates/header_menu.php

into that new folder you just created.

3) Edit the new copy of the file and find this line (should be around line #12):
if (!$_c->getCollectionAttributeValue('exclude_nav')) {

and replace it with this:

if (!$_c->getCollectionAttributeValue('exclude_nav') && $_c->getCollectionAttributeValue('is_featured')) {


4) I think you have to create this featured attribute, by going to Dashboard -> Pages and Themes -> Attributes, choose "Checkbox" from the dropdown list at the bottom, click the "Go" button, enter "is_featured" (without quotes) for the Handle, and "Featured" (without quotes) for the Name. Leave all of the checkboxes unchecked, then click the "Add Attribute" button.

Now go to the page that has the header nav in it and edit the page, then click on the header nav block and choose "Custom Template" from the popup menu. Choose "Header Nav" from the dropdown menu and click the "Update" button. It will probably now be completely blank. Go to the various pages you want to show up there and edit them and click "Properties" in the toolbar and click the "Custom Attributes' tab and choose "Featured" from the "**Add Attribute" dropdown, then check the box and Save and exit edit mode and publish changes (repeat that for every page you want to show up in that header nav list).

Good luck!

-Jordan