Skip to main content

How do I use replaceable text in custom templates?

When you create a template for others to use on your site, imagine the text that needs to change whenever the template is used, which should display in a consistent format.

For example, in a module template, you may want to always show the module's title, code and tutor at the top of the first page. You can help maintain this consistency by using replaceable text in your template. When someone creates a page (or set of pages) from your template, the replaceable text in your template is replaced by new text entered by the person creating the page.

  1. Browse to the site containing your template.
  2. Go to Edit > More > Current site tab. (You need edit or admin permissions on your site's home page to do this.)
  3. Select the template you wish to edit, then select the Edit button:

    Current site tab

  4. The SiteBuilder banner changes to green, denoting the transition to the template editor.
  5. Select Edit replaceable text.
  6. Select the Create replaceable text button.
  7. In the Site templates pop-up, enter the text to replace. All instances of this text in the template will be replaced by a term entered by the page editor. To avoid unintended replacements, use a unique term – for example:

  8. Enter brief instructions to website editors – for example:

    Enter your module code
  9. Specify whether you want the replaceable text to be case sensitive or not.
  10. Specify whether you want to replace instances of the text in the page content and page properties (headings, title bar captions, link captions, descriptions and keywords) – or the page content only.

    Create replaceable text screen

  11. Select the Save button.
  12. Continue to add more replaceable text as required (e.g. module title and module tutor).

    Replaceable text saved

  13. When you've finished, select the Done button at the top right.

Once you make your template visible in the template gallery, it's available for other people to choose when they create a page on your site. When someone selects your template from the gallery, they see an extra field for each piece of replaceable text alongside the instructions you specified.


Telephone 73737
Email webteam at warwick dot ac dot uk
How to report a problem