Hey there --

thanks in advance to all the amazing people who answer questions on here. Your experience is greatly appreciated. I hope to eventually know enough to be helpful in that way.

So here's my situation: I'm building a site for someone using a theme called Thirteen. Here's the generic thirteen from drupal themegarden: http://themegarden.org/drupal50/?q=node&theme=thirteen

Here's where I've gotten with it after a day of tinkering:
http://inprogress-sitebyashley.net/content/home

What I'm trying to figure out is this. I'd like to put the primary navigation links at the top of the page. Currently, that's not built into the theme. The only way I could get the primary links to display is if I made a primary links block and put it in the sidebar (which is what I have currently). But that's not going to work in the long run with the rest of the design I have planned. I've been looking through old posts in these forums but they mostly seem to relate to drupal 4.7... and I'm using 5.7. I've tried pasting in some of the suggested code, and didn't understand what the hell I was doing, but my syntax was wrong and it didn't work. Any suggestions?

Thanks so much,
Ashley

Comments

nevets’s picture

There are basically three parts to the task.

  1. Determine where you want the primary links and an surround html you will need
  2. Printing the themed primary links where you want.
  3. Theme (apply css) to get the look you want.

A good starting point is to find a theme with primary links close to what you want and see how they do it.

ashley.brown.eyes’s picture

ok, so I know where I want the primary links. (basically, where my breadcrumb is, at the top of the page.)

when you say determine any surround html that I will need, what do you mean? do you mean what div it's in? specifying that they are links?

as far as printing the themed primary links where i want -- i assume i need to insert the correct code into page.tpl.php within my theme, yes? I've been looking at other themes that have the primary links where I want them and inserting their primary link code, but I'm doing something wrong...

applying the css should be fine. that i don't have as much trouble with.

any clarifications would be greatly appreciated.

nevets’s picture

This "I've been looking at other themes that have the primary links where I want them and inserting their primary link code, but I'm doing something wrong..." is on the right track, when you say "doing something wrong" what do you mean?

ashley.brown.eyes’s picture

I figured out what I was doing wrong. I wasn't cluding the endif at the end of this php.

So here's what worked:

I grabbed this code from the garland theme:

if (isset($primary_links)) :
print theme('links', $primary_links, array('class' => 'links primary-links'))
endif;

and pasted it into page.tpl.php where my breadcrumb was. (commented out the breadcrumb in case I want it later, but I don't need it now. my site's hierarchy doesn't go very deep.)

then I went to my style sheet and added some code which I grabbed from garland's stylesheet but modified for my purposes

ul.primary-links {
margin: 0;
padding: 0 0 20px 0;
float: right;
position: relative;
z-index: 4;
font-family:"Gill Sans","Trebuchet MS";
font-size:1.1em;
font-weight:normal;
letter-spacing:2px;
font-color: 212503;

and it works!

I still want to do a bit more styling on the links, but I'm on the right track. Thanks for the help.