Skip to main content Skip to navigation

Use replaceable text in custom templates

When you create a template, consider any 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.

In this article:

Add or edit replaceable text

  1. Browse to the site containing the custom template you want to edit.

  2. Go to Edit > More:

    The SiteBuilder 'Edit' menu, with the 'More' option highlighted

  3. On the Current site tab, select the template you want to edit under Site templates, then select the Edit button:

    The 'Site templates' section of the 'Current site' tab, with an existing template selected and the 'Edit' button highlighted

  4. The SiteBuilder banner changes to green, denoting the transition to the template editor:

    SiteBuilder in template editing mode

  5. Select Edit replaceable text.

  6. On the Replaceable text screen, select Create replaceable text:

    The 'Replaceable text' screen for a SiteBuilder custom page template, with the 'Create replaceable text' button highlighted

  7. You see the Create replaceable text for template pop-up:

    The 'Create replaceable text for template ' pop-up

  8. 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
  9. Enter brief Instructons for editors, to describe the purpose of the replaceable text. For example:

    Entr your module code
  10. To make the replaceable text Case sensitive, select the checkbox.

  11. Use the radio buttons to specify whether you want to Replace text in page content (default) or Replace text in page content, title, headings and link captions.

  12. Select Save

  13. If necessary, you can add more replaceable text as required – for example, the module title and tutor. When someone selects your template from the gallery, they see an extra field for each piece of replaceable text alongside the instructions you specified.

  14. When you've finished, select Done.

Edit or delete replaceable text

  1. Browse to the site containing the custom template you want to edit.

  2. Go to Edit > More:

    The SiteBuilder 'Edit' menu, with the 'More' option highlighted

  3. On the Current site tab, select the template you want to edit under Site templates, then select the Edit button:

    The 'Site templates' section of the 'Current site' tab, with an existing template selected and the 'Edit' button highlighted

  4. The SiteBuilder banner changes to green, denoting the transition to the template editor:

    SiteBuilder in template editing mode

  5. Select Edit replaceable text.

  6. On the Replaceable text screen, you see a list of existing replaceable text:

    The 'Replaceable text' screen for a SiteBuilder custom page template, showing existing replaceable text

  7. Select the button for an entry to Edit or Delete it.

  8. When you've finished, select Done.

Related articles