Skip to main content Skip to navigation

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 is substituted with new text entered by the person creating the page.

  1. Browse to the site containing your template.
  2. Go to Edit > More, then select the 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 Edit:

    Current site tab

  4. The SiteBuilder banner changes to green, denoting the transition to the template editor.
  5. Select Edit replaceable text.
  6. Select Create replaceable text.
  7. In the Site templates pop-up window, 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:

    xx_module_code
  8. Enter brief instructions to other editors, such as:

    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 Save.
  12. Continue to add more replaceable text as required – for example, the module title and tutor.

    Instances of replaceable text for an architecture module

  13. When you've finished, select Done.

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.

Support

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