Hi,
I've filed a support request in the forum, but I think it might have to do with the theme, so I better write it here:
I am trying to create horizontal links of the child pages of a page based on the primary links menu. I would then like to drop these horizontal links at the top of the body of my page. It would look like this:
Child 1 | Child 2 | Child 3 etc......
I use a script I found on drupal.org, which works well:
<?php
$shortmenu = menu_get_menu();
if((arg(0) == 'node') && (is_numeric(arg(1)))) {
$curpath = 'node/'. arg(1);
$menuid = $shortmenu['path index'][$curpath];
// print "<p>Node index: $curpath , $menuid</p>";
print theme('menu_tree', $menuid);
}
?>except that the links are listed as a bullet list. I would like to have them displayed horizontally separated by "|". I've tried replacing "menu_tree" by "menu_links" in the script and it doesn't disrupt the code (I don't get an error message) but the links disappear completely.
Does any one see a solution to this? I have been looking into this for a week without finding an answer. Thanks in advance.
The (bad) example is here: http://pyrn.ways.org/about-pyrn
Comments
Comment #1
Lioz commentedi think you can solve the problem with css. you can try by adding a display:inline property for that list, something like
you can also add a separator with the background property.
let me know!
Comment #2
gostram commentedthanks Matteo. I am temporarily barred from my ftp access, but I'll get to it ASAP
Comment #3
gostram commentedhum.... Matteo, do u know by any chance where the css class might be located. The php script calls on a "menu_tree" function that I can't seem to locate.
On the other hand, when I check the CSS in the browser it tells me the list uses the "#primary" class. I guess I could modify the primary class, but it would also modify other parts of the website.
I could also create a new css class but I don't see where I would call it in my php script......
hum... ... is it time to give up on permafrost and start a career in php programming so that I stop asking dumb questions? ;)
Thanks for your patience.
Comment #4
gostram commentedhum, I tried to include it in the form like this:
and it doesn't show an error message (which is good) but the menu disappears entirely.... not sure what I did wrong.
Comment #5
Lioz commented