Skip to content

Skin Markup

johndoh edited this page Mar 23, 2020 · 8 revisions

Skin template markup language

As described on the Skins page, skin templates are regular XHTML files with special tags which are then replaced by the content according to their meaning.

Tags

The template engine of Roundcube supports the following tags. All tags are written in common HTML syntax and require certain attributes. Regular HTML attributes are also accepted and will be added to the final HTML output of the according tag.

roundcube:include

Includes (and processes) the referenced file. Similar to PHPs include() the content of the included file will be parsed by the template engine and then placed where this tag is placed.

Attributes:

  • file: Path to the file to be included starting with /
  • condition: Boolean condition to be fulfilled

Example:


roundcube:var

Returns the content of the specified environment variable. See Environment variables for possible values.

Attributes:

  • name: The variable name

Example:


roundcube:exp

Evaluates the given expression and returns the resulting content. The syntax of the expressions is actually PHP code but can contain variables as described in Environment variables.

Attributes:

  • expression: The expression to evaluate

Examples:



roundcube:label

Gets a localized text with the given name. Also allows to define localized texts for various languages and 'register' them under the given name.

Attributes:

  • name: The label name
  • condition: Boolean condition to be fulfilled
  • quoting: How to escape special characters: html,javascript,no; default is html
  • noshow: Only register the localized text under the given name but do not print it
  • : Defines the text value for the given language code

Examples:








roundcube:button

Creates a button for a specific command of the Roundcube client. A button is also registered in the UI manager and is automatically enabled and disabled according to the current state of the application.

Attributes:

  • type: The type of the button. Possible values are link|input|image
  • command: The application command this button triggers
  • prop: Additional argument of the triggered command
  • label: Localized text content of "link" buttons
  • title: The common HTML title attribute. Use the name of a localized label
  • content: The actual content of the generated HTML element
  • class: CSS class(es) for the disabled state of the button
  • classAct: CSS class(es) for the enabled state
  • classSel: CSS class(es) applied when the button is pressed
  • imagePas: Image file for the disabled state
  • imageAct: Image file for the enabled state
  • imageSel: Image displayed when the button is pressed
  • condition: Boolean condition to be fulfilled

Types:

  • link: Creates a regular tag
  • input: Creates a form button
  • image: Creates a button using the given image

Examples:




roundcube:container

This tag defines a container where plugins can add their stuff. HTML content will be added at this tags position by the template engine and it also specifies the ID of a DOM element where more content can be added client side.

Attributes:

  • name: The name of the container
  • id: ID of the HTML element which actually represents this container

Example:

...

roundcube:object

Dynamic content which is created by the application is put into the template with this tag. An object is identified by the name attribute and can require further attributes according to the object type as well as regular HTML attributes which are just passed through. The section Content objects describes all available objects and their attributes.

Please note that most objects are only available in certain steps/tempaltes. An object tag will be ignored and replaced by an empty string if it's not available.

Attributes:

  • name: The object to put here
  • condition: Boolean condition to be fulfilled
  • object-specific attributes

Examples:



(since 1.5)

Note: To use dynamic values for object-specific attributes the attribute name can be proceeded by a colon (:).

Examples:


roundcube:if/elseif/else/endif

These tags allow you the include or exclude certain parts of the template if a given Conditional expressions evaluates to true.

Attributes:

  • condition: Boolean condition to be fulfilled

Example:


  ...

  ...

Content objects

These dynamic objects are created by the core application and will be placed wherever a roundcube:object tag is found. Objects are selected by the name attribute of the tag. The following objects are available and require/support the listed attributes.

version

Prints the current version of the Roundcube installation.

loginform

The first thing you'll see is generated by this object.

Attributes

  • form: The name of the
    tag surrounding it. If empty the form tag will be generated
  • autocomplete: Is added to the input fields to enable/disable the browser's form completion

message

Gets the container for messages displayed to the user.

username

Displays the current user name.

productname

Inserts the product name set by config.

logo

Creates a tag to display the logo. If set, the src attribute is replaced by the config option skin_logo.

Attributes

  • src: Path to logo in skin folder
  • alt: Alt text for image; defaults to object productname

mailboxlist

The list of subscribed mailboxes/folders of the current IMAP account either as

    or

Clone this wiki locally