[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction


{criterion ?operator value}

August 2010

All the versions of this article:

Take the criterion into account only if a value exists in the environment for that criterion .

The criterion will only be evaluated by the loop if there is a variable with the same name in the current environment.
-  For example:
{date ?!= #ENV{date}},
{email ?LIKE %(#ENV{email})%}

-  or perhaps:

  • <BOUCLE_abc(ARTICLES) {titre ?<= #ENV{titre}}>
    • If there is a variable named titre in the loop’s execution environment, then the loop will only select the data with a matching titre <= #ENV{titre} (the articles which have a title alphabetically precedent to the title in the current environment)
    • If there is no titre variable in the loop’s execution environment, then the criterion will be totally ignored and (ALL of the articles will be selected, provided there are no other restrictive criteria for the same loop).

-  Note that regardless of the existence or not of spaces before or after the operator, ({titre ?<= #ENV{titre}} is equivalent to {titre?<=#ENV{titre}}), the ? must be directly adjacent to the operator.

Show the template of this page Site powered by SPIP | Translation area | Private area