I have been trying to get primary links and secondary links as well as blocks to show in the footer. First I tried this code which is supposed to render a horizontal links list like this (link1 | link2 | link3) but it only shows as a vertical list.

Next I changed the footer to something a bit more elaborate where I could specify the style using css in the stylesheet:

<?php if (isset($primary_links)) { ?><div class="footer_left"><?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'subnavlist')); ?></div><?php } ?>

Again, this only shows a vertical list. If I change it to $secondary_links nothing shows at all

Here is my footer CSS:

#footer {
  margin-top:50px;
  border-top: 0px solid #ccc;
 /* text-align:center; */
  height:90px;
  background-color:#FFFFFF;
  background-image:url(img/footerimg_bg.jpg);
  background-repeat:no-repeat;
  padding-top: 10px;
  padding-bottom: 30px;
  font-weight: normal;
  font-size: 0.9em;
  color: #3F89C3;
  }
#footer .inside {
	padding: 10px;
}
.footer_left {
	float: left;
	width: 45%;
}
#footer ul.links li {
	padding: 0 0 0 0.5em;
}
.footer_right {
	float: right;
	width: 45%;
	font-weight: normal;
	text-align: right;
}
#footer a:link, #footer a:visited, #footer a:hover {
	color: ;
}
#footer .footer_right a {
	font-weight: normal;
}

Eventually I want to have the footer section laid out as follows:

_______________________Copyright Info____________________________________

Primary | Links |Secondary | Links
___________________ _____________________ _____________________
|____footer block1____| |____footer block2_____| |____footer block3_____|

After a lot of reading today I am wondering if we need to specify a footer region in template.php. If so what would the code and CSS look like?

Thanks a lot for your great work :)

Comments

drupalferret’s picture

Update on this issue. I grappled with this all day then it suddenly dawned on me how to make the vertical links horizontal - one of those Homer Simpson DOH moments.

The links are just a list and a list is styled using the CSS. All it needed was to style the correct bit so a look at the source revealed <ul> and <li> needed styling.

So adding this to the css stylesheet turned those vertical footer links into horizontal links:

  /* This controls the footer links layout to show a horizontal not vertical list */
  #footer ul {
  	margin: 0px;
	padding: 0px;
  	list-style-type: none;
	float: left;
  }
  
  #footer ul li{
	display: inline;
	padding-right: 9px;
	padding-bottom: 2px;
	margin: 0px;
	}

Adding this to the footer section of page.tpl.php makes the primary links appear in the footer:

<?php if (isset($primary_links)) { ?><div class="footer_left"><?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'subnavlist')); ?></div><?php } ?>
sp_key’s picture

I have also been trying to find an easy way to do this.
Instead of the above proposed solution, I just created a block of text and inserted all my secondary links there exactly how I wanted them formatted.

It's simple and effective