Customizing the Reading Experience

Book List

The page that shows all your books is fully customizable with a Lava template. But before you go and write your own Lava, know that books now have an attribute in which you can upload a custom cover image. If you do so then it will be displayed instead of the generic cover image. So even without writing any custom Lava you can make your books page look much nicer.

There is a single variable available to you, but it's the only one that counts.

  • Books - An array of all the books to be displayed.

Book Reader

The page that lets you actually read books has a number of block settings to let you customize the look.

First, under the normal block settings there are templates for both Article Header and Article Footer. These are displayed just before the article content and just after the article content. Both are rendered in the middle column between the two TOC sections on the left and right.

The lava variables available in these templates are:

  • Article - The article currently being rendered.
  • Book - The book the article is a part of.
  • IsPrinting - Will be true if the render is being performed as a multi-article print request.
  • IsFirstArticle - Will be true if this is the first article being rendered.
  • IsLastArticle - Will be true if this is the last article being rendered.

Some of those might be a completely new concept. First off, if you specify "print=1" in the query string then the system will enter print mode. Since that causes multiple articles to be rendered, we provide the last two values as well. Between these three you can decide how you want to handle any custom rendering options during printing.

Next, under the Advanced Settings tab of the block settings are some additional settings you might want to make use of.

The first is the Show Panel option. When enabled, this will enclose the entire article (including both TOCs) inside a standard block panel. The book name will be used for the heading text.

The other two settings you can make use of are Page Header Template and Page Footer Template. These allow you to customize what is displayed at the very top and very bottom of the page. These would, for example allow you to render your own custom paneled look.

The lava variables available on these templates are:

  • Article - The main (first) article being rendered.
  • Book - The book the article belongs to.
  • IsPrinting - Will be true if this is a print request.