Skip to main content

r:editable_region

<r:editable_region />

Inserts an editable region into your page. This is the lifeblood of CleanSlate and one of its core functionalities.

Default Content

You can add default content by wrapping it inside <r:editable_region> and </r:editable_region>.

Example:

<r:editable_region name="region-name">
  This is the default content
</r:editable_region>

Attribute Options

name="region-name" - This must exist for every editable region so that the database can save the data. This is the name of the editable region. This may not have any spaces, punctuation or upper case letters. Each editable region name on a page must be unique.

type="simple" - Turns the editable region into a plain-text region. It won't have code editor or WYSIWYG capabilities. In other words, the styles in this region won't be able to be changed by the user.

scope="site" - Makes the editable region global, meaning that it will stay the same across every page where it exists. This is appropriate for content that stays the same between all pages, like header and/or footer content.

NOTE: If you make an editable region, then later decide to make it an editable region with global content, best practice is to give the region a new name in the name="region-name" field to avoid confusion in the CleanSlate database (and on your pages!).

{% editable_region %}

Inserts an editable region into your page. This is the lifeblood of CleanSlate and one of its core functionalities.

Default content

You can add default content by using the {% editable_region_block %} tag:

{% editable_region_block name: "region-name" %}
  This is the default content
{% endeditable_region_block %}

Attribute options

name: "region-name" - This must exist for every editable region so that the database can save the data. This is the name of the editable region. This may not have any spaces, punctuation or upper case letters. Each editable region name on a page/template must be unique.

type: "simple" - Turns the editable region into a plain-text region. It won't have code editor or WYSIWYG capabilities. In other words, the styles in this region won't be able to be changed by the user. They can only enter plain text.

placeholder: "Example text" - Adds default content into the editable region when you first open a page in edit mode.

scope: "site" - Makes the editable region global, meaning that the content inside the editable region will stay the same across every page where it exists. This is appropriate for content that stays the same between all pages, like header and/or footer content.

NOTE: If you make an editable region, then later decide to make it an editable region with global content, give the region a new name in the name: "region-name" field to avoid confusion in the CleanSlate database (and on your pages!).

Examples:

Standard editable region:

{% editable_region name: "main" %}

Simple editable region:

{% editable_region name: "phone_number", type: "simple" %}

Editable region with placeholder content:

{% editable_region name: "sidebar-1", placeholder: "I will be default content." %}

Editable region block:

{% editable_region_block name: "region-name" %}
  This is the default content in an editable region block.
{% endeditable_region_block %}

Last updated on March 15, 2021.

We welcome all questions, feedback and bug reports. If you're having an issue, we usually need the following information:

  • A brief description of the issue
  • A link to the page where you saw the issue
  • Screenshots that illustrate the problem - How do I take a screenshot?

Kindly email CleanSlate@mail.wvu.edu for help or use the form on the request help page.