Conditions

Chrissy Wainwright

Conditions Attributes

<replace css:theme="article" css:content-children="#content"
         css:if-not-content="#content-core"/>

if and if-not

<drop css:theme=".manageLink" if="$anon_user"/>

Checks if a variable or condition is True or False.

Rule is run if the condition is True.

if-path and if-not-path

<replace css:theme="#title" if-path="/news"/>
    News Section
</replace>

Checks the current location in the site (relative to the site root), runs the rules if path matches.

Multiple paths can be tested, separated by a space:

<drop css:content="#footer" if-path="/news /events"/>

Path Matching

The placement of slashes in the path is important.

if-content and if-not-content

<rules css:if-content="#portal-column-two">
...

Checks if an element exists on the current page.

SpaceForward
Right, Down, Page DownNext slide
Left, Up, Page UpPrevious slide
POpen presenter console
HToggle this help