Hi,

In my alternative 'front_page' I need to include my primary links section. using the normal page.template.php snippet for the primary links:

print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist'))

does not work. The only way I get my primary links shown on my site is through inserting them as a block with the following code:

$block = module_invoke('menu', 'block', 'view', 2);
print $block['content'];

But this leaves me with my unformatted primary links. I need them listed/styled horizontally in a bar-format and can't find a way to attach them to my theme's css for the primary links. I only have trial and error php/css experience so it might be that I'm to stupid to understand the basic logic of this... So, if anyone can help me out with a working snippet or with a way to style my 'block'-snippet...

My site's online at http://blik.byethost22.com/drupal5/
As an anonimous user you'll immediately arrive at my front-page and see the problem...

Thanks a lot!

Wouter Bouchez

Comments

Phillip Mc’s picture

try this:

  1. under CREATE CONTENT, create a new page
  2. paste your snippet into the page
  3. select PHP input filter
  4. submit page

that will show you if the snippet works outside the front page..

Phillip Mc’s picture

Try this snippet and replace the "custommenu" class with your own:

$tree = menu_tree(2);
print "\n<ul class=\"custommenu\">\n". $tree ."\n</ul>\n";

That will wrap your primary links in <ul class="custommenu"> so you can style it using CSS.

please report back up here if this works...

dublin drupaller’s picture

Status: Active » Closed (fixed)

please reopen if needed.