Read More

module_read_more

The Read More module progressively reveals part of a content block. It can be used on any landing page built with the subpage_layout system.

The module was originally built for the Better Taxes FAQs page, where each FAQ can show an introductory answer and let visitors reveal the remaining detail. It is not limited to FAQs and can be used for any long-form landing-page content.

#Setup

  1. Create a Basic subpage underneath the landing page that has the subpage_layout tag.
  2. Add the tag module_read_more to the Basic subpage.
  3. Add the content to the module page's WYSIWYG editor, or add published Basic child pages underneath the module page when you need multiple items.
  4. Insert an inline horizontal rule (<hr>) at the point where the content should be hidden.

The module page and its child pages must be published so that the subpage_layout system can render them.

How the reveal works

For each content block, the first <hr> found in the WYSIWYG content is replaced with a Read more button:

If a content block does not contain an <hr>, it renders normally without a Read more button.

WYSIWYG example

Add content in this order:

<p>A short introduction or summary that is visible immediately.</p>
<hr>
<p>Additional detail that visitors can reveal by selecting Read more.</p>
<p>This can include the rest of the formatted WYSIWYG content.</p>

The <hr> is a divider, not content: it is replaced by the button when the page is rendered.

Single or multiple items

Single item

Use the module page's own headline and Basic content for one Read More item. The headline is optional. Add an <hr> to the Basic content wherever the reveal should begin.

Multiple items

Add published Basic child pages underneath the tagged module page. Each Basic child becomes a separate item:

Each child page is processed independently, so every item can have a different amount of visible and hidden content. If the module page also has its own headline or content, that content is rendered as an additional item before the child items.