No categories assigned

TemplateStyles

TemplateStyles allows to format templates appealingly.

Features

  • Users with write access can style templates without administrators (opposite:Common.css)
  • The CSS declarations are integrated via the <templatestyles> tag
  • CSS is automatically assigned to the content area of the page

Example

Here you create a template for a quote. The link to the stylesheet is inserted at the beginning of the template.

<templatestyles src="Zitat/styles.css" />
<blockquote>
 <span class="pull-right">[[{{{1}}}|edit]]</span>
{{ {{{1}}} }}
</blockquote>

The stylesheet itself is created as a subpage: template:quote/styles.css

blockquote {
    padding:1em;
    background-color: #FAFAFA;
}

More info about TemplateStyles can be found on Mediawiki.org.

Related topics

Attachments

Discussions