Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > > The syntax of the templates

The syntax of the templates

SPIP uses a syntax to write templates which has a limited vocabulary but which is also extremely rich and modular in nature. This syntax, defined explicitly in the ecrire/public/phraser_html.php files, contains elements such as:

  • the loop ("boucle" in French)
    1. <B_loopname>
    2. ... before content
    3. <BOUCLE_loopname(TABLE){criteria}>
    4. ... for each matching element
    5. </BOUCLE_loopname>
    6. ... after content
    7. </B_loopname>
    8. ... else content
    9. <//B_loopname>

    Download

  • the field or tag ("champ" and "balise" in French)
    1. [ before (#TAG{criteria}|filters) after ]
  • the argument ({args}, |filter or |filter{args} on tags)
  • criteria ({criteria=param} used on loops)
  • code inclusion
    1. <INCLURE{fond=included_code_segment_name}>
  • placeholders ("idiome" in French) (language specific character strings)
    1. <:type:string_code_name:>
  • polyglots ("polyglotte" in French) (<multi> used throughout templates and in user text)
    1. <multi>[fr]français[en]English</multi>
  • Author :
  • Published :
  • Updated : 02/06/10
  • Translations : English, français