Fork me on GitHub


An article by Gaspard Bucher

Set default parameters.

Set default parameters.

This method lets you set default parameters for sub elements such as date formatting options, disabling html escape, labels, etc.

In the following example, all attributes are shown with a translated label:

<ul do='default' label='t' blank='hide'>
  <li do='show' attr='title'/>
  <li do='show' attr='surname'/>

In french, this would produce:

  <li><label>titre</label> <span>La vie en rose</span></li>
  <!-- no surname, element removed -->

Add host to links

This is useful in rss feeds or exports for example.

<r:default host='#{}'><r:link/></r:default>