Skip to content
flack edited this page Dec 8, 2016 · 1 revision

Style Elements hold the actual code of a Style. They are based on the MgdSchema midgard_element.


Style Elements are organized in Styles which form a tree structure. Substyles inherit their parent Style's Elements but can overwrite them. There is a special ROOT Style Element, from which the elements are referenced.

One of each Style's Elements should include a reference to the actual content (usually in this form: <(content)>) to load it from Topics and Articles.

Styles can also be linked to Topics and two special Style Elements exist which can be used to load Style Elements from any given Style or Substyle, they are called style-init and style-finish.


Typically, a web page produced by Midard consists of different blocks, for each of which a style Element exists where the layout can be changed. Style Elements often also contain PHP code for modifying the output based on the available variables. Style Elements can be used to customize the Component's output. For information, please refer to Style Engine.