开发者

Drupal Secondary Links Front Page Issue

I'm trying to get my secondary links (which are using primary links as the source, so the children of the primary links) to display as a dropdown on every page. However, since (im guessing) there is no active trail on the front page, the 开发者_如何转开发secondary links aren't displayed.

How do I set them so that I can display the secondary links on the front page?


If you want to display secondary links only on frontpage, don't forget to add an if statement such as:

if ($is_front) {
    print theme('links',$secondary_links,array('class' => 'class-for-secondary-links'));
}

Or just use custom template for frontpage.


You can use the "theme" function to display the secondary links into your front page:

 print theme('links', $secondary_links, array('class' => 'links secondary-links'));

And to create the dropdown you can overwrite the "theme_links" function into your template.php file: http://api.drupal.org/api/function/theme_links

Hope it helps.


The Menu block module will do what you're describing and a whole lot more.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜