Hi all, thanks for your time to read this

I have done all of my design work for my site in html/css and have started now to create my own Drupal7 theme

I've read a lot of posts and it is starting to take shape, the problem I have is with my custom main menu and I hope someone can help, I have added the php code to the div and a section of my page.tpl.php now looks like the code below

The problem is that I have 2 menus - the one that is the Drupal one and my custom one .. I have played around with different ways but can't get the 2 to marry up .... what am I doing wrong?

(I **'d out the HTML so you can see without it hurting anything)

Thank you in advance :))

if ($main_menu_links || $secondary_menu_links):

<**div class="header">
<**header class="header_content">
<**ul class="mainnav">
<**li class="menu_link homepage_on">
<**a class="mainnav_text" href="content/homepage">homepage
<**span class="mainnav_bottom mainnav_left">
<**span class="mainnav_bottom mainnav_right">
<**/li>
<**li class="menu_link">
<**a class="mainnav_text" href="content/contact">contact
<**span class="mainnav_bottom mainnav_left">
<**span class="mainnav_bottom mainnav_right">
<**/li>

Comments

nevets’s picture

What do you mean by "marry up"?

Are you adding the custom menu through drupal's menu admin page?

pokethejoker’s picture

Sorry - by marry up I simply mean that I want them to be the same thing

I have created the same menus using the menu admin page as I have setup on my HTML page .. so currently I have 2x contact 2x services ect ... I just want one menu, my custom menu not the default Drupal one that is currently above it. I don't think I have the code quite right

nevets’s picture

Why not just use the main menu?

pokethejoker’s picture

I have basically spent so long trying to get the CSS design perfect that I want it to be the same on the Drupal site

I know it is something to do with the naming conventions .. but I am at a loss

Jaypan’s picture

You're going about it the right way. You shouldn't be altering your HTML to match your CSS, you should be matching up your CSS to match your HTML. Use the Drupal provided HTML.

pokethejoker’s picture

Thanks - that's what I am trying :)

I am going to reword the question to see if I can explain it better

In the Drupal code it says ?php print $main_menu_links; ?> to explain all the links in my menu - whereas I have different css styling for each separate link (services / contact / ect) and I am not sure how to break up Drupals code to match my css or vice versa

VM’s picture

I think jaypan meant "you're not going about it the right way".

You can view the rendered HTML in a browser which will display the output of $main_menu_links I also highly suggest using your browser inspector tools.

Then you adjust your CSS to work with already existing HTML output else you need to intercept/override the core output and include your own.

Jaypan’s picture

I think jaypan meant "you're not going about it tghe right way".

Oops, that's exactly what I meant.

VM’s picture

(I **'d out the HTML so you can see without it hurting anything)

Put your code between code tags. Much easier to read.