At Drupal 5 adding this code was the way to put primay links

<?php if (isset($primary_links)) :

print theme('links', menu_primary_links(), array('id' => 'primary_menu'));

endif; ?>

Now I am building a site with Drupal 6 and my sublinks don't appear. Even if I select expand option it just alters output and gives active class to that menu but still there are no sublinks. I wonder why do this happen and how to solve that I want an output like this since I will use jquery to build dropdown menu

<ul class="nav">
				<li class="current">
					<a href="#a">menu item &#8595;</a>
					<ul>
						<li>

							<a href="#aa">menu item</a>
						</li>
						<li class="current">
							<a href="#ab">menu item &#8594;</a>
							<ul>
								<li class="current"><a href="#">menu item</a></li>
								<li><a href="#aba">menu item</a></li>

								<li><a href="#abb">menu item</a></li>
								<li><a href="#abc">menu item</a></li>
								<li><a href="#abd">menu item</a></li>
							</ul>
						</li>
						<li>
							<a href="#">menu item &#8594;</a>

							<ul>
								<li><a href="#">menu item</a></li>
								<li><a href="#">menu item</a></li>
								<li><a href="#">menu item</a></li>
								<li><a href="#">menu item</a></li>
								<li><a href="#">menu item</a></li>

							</ul>
						</li>
			</ul>

Comments

dvessel’s picture

Go to "Administer > Site building > Menus" then hit the "settings" tab. Make sure the source of your secondary links is primary. The behavior is more configurable now.

joon park

LiquidWeb’s picture

Thanks I did it but nothing happend!

Currently I have this code in my theme

		<?php if (isset($primary_links)) : ?>
	          <?php print theme('links', $primary_links, array('id' => 'mainmenu-nav')); ?>
	        <?php endif; ?>

How should I modify this code to have such output?

dvessel’s picture

You have to configure all your secondary links through the primary menu page. It definitely isn't ideal and I see how it is confusing.

joon park
–the devil in the details–

LiquidWeb’s picture

Sorry but still didn't got it. Sı instead of trying to get my ideal xhtml output I decided to update my page.tpl and CSS so I added a block region for menu and altered my css to have my output styled properly. Now everything works ok but still I wonder how can I achieve to get rid of those extra classes at module output.

fmarvez’s picture

I'm also having this same problem and have yet to figure out a solution to it.

LiquidWeb’s picture

Now I am using nice menu module and updated my for nice menu.