This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation
#footerNav ul {
  list-style: none;
}

#footerNav li {
  float: left;
  padding: 0 5px;
}

Originally posted by pvernaglia at weblicating.com.

 


Often a client wants a Footer Menu that has some pages from their Main Menu (in the header) and other pages that are excluded from the Main Menu. With a simple modification to an Auto-Nav template and a Checkbox Page Attribute, you can have this customizable Footer Menu.

Repurpose the Existing Header Menu Template

Concrete5's Auto-Nav block comes with a template file called header_menu.php. It's located in concrete/blocks/autonav/templates. First, copy that file and rename in footer_menu.php and save it in blocks/autonav/templates. Then, open it with your favorite editor and find this block of code:

$isFirst = true;
foreach($aBlocks as $ni) {
    $_c = $ni->getCollectionObject();
    if (!$_c->getCollectionAttributeValue('exclude_nav')) {

Change the last line to this:

if ($_c->getCollectionAttributeValue('include_footer')) {

Save that file and go into Dashboard - Pages and Themes - Attributes and add a new Check Box Attribute called "Include in Footer Menu"

footer_attribute.png

Go to Dashboard - Sitemap and in the property settings for any page that you want to appear in the Footer Menu add the attribute "Include in Footer Menu".

footer_insert_attribute.png

Now add an Auto-Nav block in your footer (or wherever you want the second menu), accept the default settings and click on Add:

footer_autonav.png

We normally add this to a Scrapbook as a block called Footer Menu then insert this code where we want it in our page:

    <div id="footerNav">       <?php         $block = Block::getByName('Footer Menu');           if( is_object($block) ) $block->display();         ?>     </div>  

Select the Custom Template "Footer Menu" for your Auto-Nav block.

footer_template.png
Now your Footer Menu will display only the pages that have the 'Include in Footer' attribute selected. Most likely the menu will be displayed as a vertical list with bullets. You can style it for a horizontal list or how ever you need it for your site.  A very simple style for a horizontal menu could start out like this:

Loading Conversation