Tips and tricks

Break headers in multiple lines

In wiki, a header is a single line starting with ---+. The moment you press enter key and create a new line, you also stop the header. In order to split a header in multiple lines, use the %BR% macro. %BR% generates a new line, but continues the same line as for wiki processor.

The wiki text

---+++Centered header%BR%with multiple%BR%lines

Will compile into

Centered header
with multiple

Conditional visibility

By using macros, you can control elements visibility. We'll use two macros, {@user} and {@equals}. The first one will check if current user id is blank, in which case no user is authenticated. The second macro will expand to none when user id is blank, and to blank otherwise.

The wiki text

[block(display:{@equals:{@user:id}::none: })]
Hello {@user:name}!

The statement the equals macro aims to resolve is: if user id is blank, write none, otherwise write one space. Read more about the equals macro in Generic .

Will compile into, visible only when authenticated

Hello !

If you're an unauthenticated visitor, you'll be able to see the invisible block by inspecting the element.
Printer version
English01/11/18 11:21Lluís Turró Cutiller