By ano1 on
Hello,
I am using the books module and am creating several books on my site. Can anyone please share with me the code I would need to be able to have a list of books (in <UL>) on my site on the main front page. Each book title should link to the book. I would like to mix this list into my content. For example:
Paragraph One
List of Book Titles (each title linking to the book)
Paragraph two
I assume the same snippet could also be used in a block. No?
Thanks
Ano1
Comments
Someting like this?
http://drupal.org/node/44648
Can be used either as a page or a block.
List of books not list of pages
This will successfully list the pages of a single book. I think the question was for a block to list a group of books - a bit like the navigation menu under administer->content->books.
Use views to get list of books
I use the great views module to generate a list of books as follows:
- Set the view up as a table
- Provide both page and block views
- Select node: title field. Set it to display as a link
- Filter for node:type = "book page". Filter for book: parent node = 0
- Sort accordingly
This will let you tailor the view to you wishes and position it (as a block) where you see fit.
Hope this helps.
tagging...
could be useful. thanks!
Drupal 7
At least in Drupal 7, use "Book : Depth = 1" (there's nothing called "parent node")