Trex Rules


This is a list of all the rules supported by Trex.

For an explanation of rules see this section of the Trex docs.

If you want to see the source of the examples, Choose Open By URL in the File menu in Fargo, and enter this URL.

expanded

A boolean value. If true, the headlines are expanded, if false they are not expanded.

<rules>

<rule level="1" to="1">

<expanded>true</expanded>

</rule>

</rules>

Default is false.

Example. The first-level heads are expanded. The second-level heads are not.

no-icons

A boolean. If true, icons are displayed next to headlines that have subs.

<rules>

<rule>

<no-icons>true</no-icons>

</rule>

</rules>

If icons are turned off and a headline has subs, you can click on the text of the headline to expand/collapse.

Default, true.

Example. Icons are turned off.

list-space

A length spec. It adds the amount of space specified after the list.

<rules>

<rule>

<list-space>30px</list-space>

</rule>

</rules>

Default is 0. If list-space is not specified, no space is added after the list.

It sets the padding-bottom property of a div containing the list

Example. list-space is set to 30px.

outline-indent

A length spec. It adds the amount of space specified to the left of the list.

<rules>

<rule>

<outline-indent>40px</outline-indent>

<expanded>true</expanded>

<no-icons>true</no-icons>

</rule>

</rules>

Default is 0, though as explained in the Defaults section above, most nodetype templates define it as a non-zero value.

Example. outline-indent is set to 40px.

outline-space

A length spec. It adds the amount of space specified after the outline item.

<rules>

<rule level="2" to="2">

<outline-space>25px</outline-space>

</rule>

<rule level="1" to="1">

<font-weight>bold</font-weight>

</rule>

<rule>

<expanded>true</expanded>

<no-icons>true</no-icons>

</rule>

</rules>

Default is 0.

Example. Adds 25px after each second-level head.

outline-space-before

A length spec. It adds the amount of space specified before the outline item.

<rules>

<rule level="1" to="1">

<outline-space-before>25px</outline-space-before>

</rule>

<rule level="1" to="1">

<font-weight>bold</font-weight>

</rule>

<rule>

<expanded>true</expanded>

<no-icons>true</no-icons>

</rule>

</rules>

Default is 0.

Example. Adds 25px before each first-level head.

permalink

A boolean. If true, we add a paragraph-level permalink at the end of each item.

<rules>

<rule level="1" to="1">

<permalink>true</permalink>

</rule>

<rule>

<expanded>true</expanded>

<no-icons>true</no-icons>

</rule>

</rules>

Default is false.

Example. Each of the first-level heads has a permalink.

icon-expand

The name of a Font-Awesome icon that is used as the icon to expand outline items.

<rules>

<rule>

<icon-expand>thumbs-down</icon-expand>

</rule>

</rules>

Default is a right-pointing gray wedge.

Example. Sets the icon for expanding to a white plus-sign inside a black circle.

icon-collapse

The name of a Font-Awesome icon that is used as the icon to collapse outline items.

<rules>

<rule>

<icon-collapse>thumbs-up</icon-collapse>

</rule>

</rules>

Default is a down-pointing gray wedge.

Example. Sets the icon for collapsing to a white minus-sign inside a black circle.

CSS-based rules

You can set any CSS property at any level of an outline using rules. So there's large variety of things you can do.

This example sets font-weight, font-family, font-size and line-height.


Posted on Saturday, June 29, 2013 at 7:57 PM by admin.