Hi all, I want to change footer link, how can I use secondary links instead primary links ?

Comments

florian’s picture

You have to modify something in page.tpl.php. Look for this line:

<?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist2')) ?><?php } ?>

... and change it into:

<?php if (isset($secondary_links)) { ?><?php print theme('links', $secondary_links, array('class' =>'links', 'id' => 'navlist2')) ?><?php } ?>
florian’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mlines’s picture

Version: 6.x-1.2 » 6.x-1.3
Status: Closed (fixed) » Active

Hi - thanks very much for a great theme,

I'd like to customize the footer links. Instead of primary or secondary menus, I'd like my "custom-footer" to display there. I tried this to no avail:
<?php if (isset($custom-footer)) { ?><?php print theme('links', $custom-footer, array('class' =>'links', 'id' => 'navlist2')) ?><?php } ?>

florian’s picture

I don't understand what do you want to customize. ... a custom "third" menu links?

mlines’s picture

Sorry for being unclear. I want to have links in the footer menu that are different from those in the primary and secondary menus.

My thought was to create a new menu, and then ask Zero Point to use it in the footer position, but it is entirely possible that I am missing a more elegant solution...

florian’s picture

I think a more elegant solution in oder to be able to update the theme's code is to hide bottom links by adding this line to /_custom/custom-style.css:

#navlist2 {
  display: none;
}

Then create a new block with your links and place it to the "Bottom content" region. To have the same look, just create the links as follow, and don't forget to have full html imput for that block:

<ul class="links" id="navlist2">
<li><a href="/node/1">Link1</a></li>
<li><a href="/node/2">Link2</a></li>
</ul>
mlines’s picture

Thanks for taking time with this. Your solution is working. I correct a typo you made:

This line:
<ul class="links" id="navlist2">

Should read
<ul class="links" id="navlist1">

exactlyhow’s picture

The simplest way to work with the footer menu is to open and edit the page.tpl.php file, scroll down to line 271 or so, and change the html embedded in the php. It's just smple anchors. No biggie!

florian’s picture

Nope, use only custom-style.css and don't touch page.tpl.php. This will let you upgrade the theme in the future.

jonboy18’s picture

Perfect solution. thanks Florian

gajanannehul’s picture

hi
im having same problem my page.tpl file dosen't have such lines....

this is my code i change my menu but its not applied on all pages..
echo '

Home | Books | Authors | About us | Contact
'.
'Copyright © 2011 '.$site_name.'. All Rights Reserved.

';

florian’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

This was fixed in newer versions.