Styles

From MidgardWiki

Jump to: navigation, search

domortrt Styles are meant to include the presentation layer for the actual website. In a Midgard MySQL Database, they are stored in the style database table and are based on the MgdSchema midgard_style

Structure

In regular Midgard, Styles can be associated to Hosts and Pages, the association to Pages and Hosts is done via the Styles' ID in the MySQL Database. They can contain any number of Style Elements and also a special ROOT Element, from which other Style Elements can be referenced.

Styles are organized in a tree structure, so they can include Substyles, which inherit the parent's elements. The Root Style is the style associated with a Host and should contain a ROOT Element for the site to function.

For information about inheritance, please refer to Templating in Midgard

Styles in MidCOM

In MidCOM, Styles can also be associated to individual Topics, the association to Topics via the Style's name and path, so when the Style is moved or renamed, MidCOM won't be able to find it. Since the Styles are still organized in a tree, the inheritance rules lined out above apply here, too. In addition to that, MidCOM offers a number of functionalities of its own, which are described at Templating in MidCOM.

Personal tools