By gostram on
Hi, I am looking for a very short piece of code to list child pages horizontally at the top of a book page. I don't want to put it in the template, but rather do it myself on the book pages I wish to add it to. I don't want to display a block. I want to have something very simple.
Basically, that would mean only a line of code to say "display child pages separated by a blank space"
Is that something doable? I don't know anything of programming. Anything in php or in html would be great!
Thanks
Comments
Found it, but....
Finally found the solution: http://drupal.org/node/26502
now my links display at the top of the content, which I wanted: http://pyrn.ways.org/publications. I created a block wich I filled with a script to display child menus and then displayed it in the content. It is actually great, because it doesn't use the layout of the block, but I woudl like to go further than this and "style" the list of links.
Basically I would like them not be presented as a list, it takes too much space, but rather to be put in boxes and separated by a space, something very much alike the pager function.
I tried to take a shortcut and to assign the pager class to the list, but it doesn't like it, or doesn't show it:
Does someone see something wrong in there? I am no php programmer, but it shouldn't be too hard I am guessing. Please provide help! thank in advance!!!
The other solution for me would simply to add some kind of line in the code to tell Drupal not to list the block content as a bullet list, but rather inline (separated by tab spaces for instance). That could be easier I guess. Any ideas?
I just figured out that I
I just figured out that I could use the code that was in the block:
directly into the content of the page. No need to "call" the block. The issue remains though: How to make the above code show with the look of the drupal pager (css class pager) or simply not to show up as a list:
Example here: http://pyrn.ways.org/about-pyrn
I have a class assigning
I have a class assigning some inline properties in my css:
could someone maybe tell me how I basically insert this class into the code above? (#3).
Thanks in advance.
how do I use something else than menu_tree
hum, after browsing most drupal pages, trying to implement functions like menu_links instead of menu_tree, I have to say I am running out of options. It is really too bad, I don't think it should be too hard to display the child pages in the primary links menu horizontally instead of the "menu_tree" layout, but I can't figure it out.
Is there a forum specifically for newbies? where I could ask my stupid questions and get an answer? would be great. Thanks
I'm onto something...
Hi, I'm a newbie too who was looking for the same solution. I did find one by adding some CSS to my style.css, but I am using the Contented7 theme. If it doesn't work for you then I still think it's enough information to get you started.
What I did was use the FireFox extension FireBug to inspect the CSS of the child pages tree and I saw that the child pages were displaying under the context of the div class "book-navigation" so I added the following to the end of my style.css and was able to get horizontal display of the child book pages.
Again, this only worked for me on the Contented7 theme. Hope that helps!
I quickly realized that my
I quickly realized that my "solution" is only a start, since it breaks on large numbers of child pages. It just shows them on one very long horizontal list. Someone would need to modify the code to, say, limit each list to a certain number, then start a new list below to show the rest, etc.
Thanks for the tip
Thanks indeed. I will have to look into this. Right now, I have hard-coded my sub-menus, but I would definitely like to make it a dynamic listing. Thanks.
Doesn't work
Hello, I'm having the same issue- when I'm at the root of a particular page, I just want to show all child pages underneath. Seems like there'd be a simple echo $menu command that would show it, but haven't seen anything. The code above doesn't work in 6.10- it gives me a blank screen.
Any ideas?
partial solution
I figured out how to display the menu links, but still don't know how to narrow it down to only show child links:
Ideas?