|lien_ou_expose

The |lien_ou_expose filter returns either a clickable link or just a simple text title.

When applied to a given URL, the |lien_ou_expose{text_title, condition} filter will evaluate the condition and display either a link to that URL or just the text string that is passed as the first argument.

Example:
[(#URL_RUBRIQUE|lien_ou_expose{#TITRE, #ENV{test}|=={en_cours}})]
will display if there is a variable named "test" and its value is "en_cours" (in progress) in the current environment:
   Title_of_the_section
otherwise it will instead display just:
   Title_of_the_section

 
 
 

The filter also accepts 3 optional supplementary arguments "class", "title" and "rel".

[(#URL_RUBRIQUE|lien_ou_expose{#TITRE, #ENV{test}|=={en_cours}, spip_link, the best section, libraryentry})]

would then generate the following HTML source code (provided the condition evaluates to true):

<a href='-Title_of_the_section-.html' class='spip_link' title='the best section' rel='libraryentry'>Title_of_the_section</a>


otherwise it generates just:

<strong class='on'>Title_of_the_section</strong>

Author Mark Published : Updated : 26/10/12

Translations : català, English, français, Nederlands