Helma Logo
main list history
previous version  overview  next version

Version 1 by michi on 08. December 2005, 17:12

see http://home.leetsoft.com/liquid

  function i18n(input) {
    return this.renderSkin(createSkin(getText(input)));
  }
  function modulo(input, mod) {
    return input % mod;
  }

  <h1>{{ "site.topics.header" | i18n }}</h1>
  <p>
  {% if this.count() == 0 %}
    {{ "No topics to display." | i18n("site.topics.noTopics") }}
  {% else if this.count() == 1 %}
    {{ "This site has just one topic." | i18n("site.topics.oneTopic") }}
  {% else %}
    {{ "This site has {{ this.count }} topics." | i18n("site.topics.moreTopics") }}  # FIXME ??
  {% endif %}
  {% for item in site.list() %}
    {% if forloop.first %}
      <table>
        <tr>
          <th><hc:this.msg id="site.topics.tableHead.topic">Topic</hc:this.msg></th>
          <th><hc:this.msg id="site.topics.tableHead.numberOfStories">Number of Stories</hc:this.msg></th>
        </tr>
    {% endif %}
        <tr class="row{{ forloop.index | modulo(2) }}">
          <td>{{ item.name }}</td>
          <td>{{ item.count }}</td>
        </tr>
    {% if forloop.last %}
      </table>
    {% endif %}
  {% endfor %}

     removed
     added