Change theme:   

content

Used to define areas that are editable on page:

{% content name="sidebar" %}

If you want the same content area to be shared across all pages (we like to call it cross-page content), just use extra xpage attribute:

{% content name="footer" xpage="true" %}

Notice that cross-page content remains the same accross the pages in same language environment. So users will have to create content for each language environment.

For last example, there is also an shortcut tag xcontent to generate cross-page content.

Attributes

name

Sets the name to idenfify editable content area because there may be multiple areas on the same page. It is wise not to provide same content name twice on the same page.

If you do not provide name it will default to "body" which is a default content area on each page.

xpage

Set to "true" if you want this content area to be shared accross all pages.

only

Set which types of content are allowed for given content area. Multiple types separated with comma may be specified. For example, the following allowes user to add only text blocks and forms into content area:

{% content name="sidebar" only="text,form" %}

Valid content types are:

  • text - text block
  • gallery - photo gallery
  • form - form area

Only these known content types will be recognized (incorrect ones will be ignored). If this argument is omitted or contains only unknown types, all available content types for this user can be added.

Notice that this attribute only affects the add content button. User can still drag any type of content into this content area from some other area.

bind

Creating a content tag on blog article page will result the content in this area be shown on all article pages in that blog. To assign the content only with blog article that is currently visible, add bind attribute to the content tag.

{% content name="blogarticle_gallery" bind="Article" %}

This way you can add additional content elements, such as forms or photo galleries to your blog article.

On element page similar logic can be used for binding content to element

 {% content name="element_content" bind="Element" %}

xpage

Set to "true" if you want this content area to be shared accross all pages.