Developer manual

boilerplate

Embeds boilerplate content

Updated: Type: springtag

Method

<boilerplate/>

Details

Using the boilerplate plugin requires three components:

1. The <boilerplate/> springtag positioned in layout.xml in the required location to match the design.

2. A folder with the following settings:

  • Title 'Boilerplates'
  • ID: 'boilerplates'
  • Status: 'Invisible'
  • Default Custom Form: 'custom.boilerplate.xml'

This folder is where the editor will create the content which will then become available as boilerplate content.

3. In the custom form for the site (i.e. custom.pages.xml) the following tag:

  • <template value="spring.boilerplate.xml"/>

This will add a new tab called 'Boilerplate' when editing a page.

Examples

#1

Request

<boilerplate/>

Embeds any boilerplate content chosen for the current page.

Response

<div class="boilerplates">
  <div class="item" id="boilerplate-20120423130338">
    <h2>Lorem ipsum</h2>
    <p>Sed orci magna, semper in, faucibus id, porttitor a, enim.</p>
  </div>
</div>