Show chapter under book

Show chapter under book

by roobin np -
Number of replies: 3

I have added book as modules in my page but in view.php page only book title is showing, ineed to show all chapters under each book as sublist.

In the attachment you can see books are showing as module1, module2

i need the display like

Module1

  • chapter1
  • chapter2
Module2 

  • chapter1
  • chapter2
Please, Can anyone help?

Attachment module.jpg
Average of ratings: -
In reply to roobin np

Re: Show chapter under book

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi roobin np,

Create each of your books and it's chapters.

  • Goto book 1 chapter one and copy the url in the address bar.
  • Edit Book 1 and type "Chapter one", into the description text area,
  • select your new text and click the "Link" toolbutton and paste the url into "Enter a URL" and click Create link.
  • Then place a checkmark in "Display description on course page" and then click Save and display.
  • Repeat first four steps for the other chapters.
When you are done you will have what you want.

Average of ratings: Useful (1)
In reply to AL Rachels

Re: Show chapter under book

by roobin np -

Hi Rachels,

Thank you for your answer, i have done as you said.

I would like to know is there any plugin available that will automatically add chapters under module.

In reply to roobin np

Re: Show chapter under book

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Sorry, none that I know of, but here are some possibilities.

  • You could use Snippet for the text portion, but you would still need to add the links manually to each of the chapters.
  • Since a book already gives you a table of contents when you are viewing the book, it might be possible to add code to give you the option of automatically placing a copy of the TOC in the description.
  • It might be possible to do the above by using a Generico filter that extracts the TOC links from the database and places them in the description.