Generic

Generic use macros.

Macro

Description

{@webroot}

Translates into web application's context

{@lang}

Writes current locale

{@param:name[:default]}

Writes parameter with name value or default when null.

{@res:resource_key[:mode]}

Gets resource value and renders as mode. Mode is an integer optional parameter. Mode's values are:

  • 0 - No transform.
  • 1 - Capitalized.
  • 2 - To upper case.
  • 3 - To lower case.

{@random:limit}

Writes a random number starting at zero and up to limit minus one.

{@context:level}

Writes context identifier. Contexts exceeding level are dismissed.

{@user:(name|id|email)}

Writes currently logged user's name, identifier or email.

{@if:role:attribute:
true_expression:false_expression}

Writes true or false expressions depending on whether role:attribute pair are satisfied.

{@equals:value1:value2:
true_expression:false_expression}

Writes true or false expressions depending on whether value1 equals value2.

{@class:className:
true_expression:false_expression}

Writes true or false expressions depending on whether class could be instantiated.

{@files:path:
pattern:(normal|sort|shuffle)}

Writes a json array of files matching path and pattern. The array can be as is, sorted or shuffled.

Printer version
English06/08/11 18:02Lluís Turró Cutiller
English09/23/11 13:43Lluís Turró Cutiller
English03/02/12 10:26Lluís Turró Cutiller
English06/17/14 11:51Lluís Turró Cutiller
English07/10/14 13:25Lluís Turró Cutiller
English06/04/15 08:50Lluís Turró Cutiller
English01/08/18 10:39Lluís Turró Cutiller
English01/09/18 18:55Lluís Turró Cutiller