By ephy on
Hi the drupal community,
I am a newbie in the community, i hope someone may help.
I build a new theme for my web site.
I tried to implement a menu with sub menus. But even if the sub menus are defined as "expanded", they don't appear at all.
following the html code on my site:
<div id="menu">
<div id="primary">
<ul class="links">
<li class="menu-121 first"><a href="/AboutUs">About us</a>
</li>
<li class="menu-491 last"><a href="/node/10" title="Solutions">Solutions</a>
</li>
</ul>
</div> <!-- /#primary -->
</div>
on the page.tpl.php, the menu is as following:
<div id="menu">
<?php if ($primary_links): ?>
<div id="primary">
<?php print theme('links', $primary_links); ?>
</div> <!-- /#primary -->
<?php endif; ?>
<?php if ($secondary_links): ?>
<div id="secondary">
<?php print theme('links', $secondary_links); ?>
</div> <!-- /#secondary -->
<?php endif; ?>
</div>
When i use another theme, everything is fine...
someone know what to do?
I try to search the net about submenu and jquery but nothing works...
Comments
your theme Doesnt Have the
your theme Doesnt Have the javascript for the drop Down
Try nicemenus module. this will definitely help you
Cheers
ask4prasath@gmail.com
that's the point!
thank you for your response...
It will be cool for me to understannd why it doesn't work !
I prefer to fix the bug instead of using a patch (nicemenus...)..
10x
no news?
no news?
Cheers for Drupal Prasath
Cheers for Drupal
Prasath
I was struggling with the
I was struggling with the same problem. I found that the links were working fine when the Garland theme is enabled so I know it was a problem with my theme. Sure enough, after examining page.tpl.php I found the following lines:
So I removed the elseif and changed the 4th line to say $secondary_links instead of $primary_links. Clearly the theme I'm using (spreadfirefox) wasn't developed to handle secondary links. By making changes to the above, the secondary links then worked perfectly.
is secondary links enabled on
is secondary links enabled on admin/build/themes/settings? This is what the theme is looking for with the
if ($secondary_links)statementThis is your solution: <?php
This is your solution:
correction
Don't forget to use the render function!