/priv/skel/blog/templates/home.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 32 lines · 22 code · 10 blank · 0 comment · 5 complexity · 5bee147096fd9e693e2f6268473807ea MD5 · raw file

  1. {% extends "base.tpl" %}
  2. {% block title %}{{ m.rsc[id].title }}{% endblock %}
  3. {% block content %}
  4. {% if m.rsc[id].is_featured %}
  5. <h1>{{ m.rsc[id].title }}</h1>
  6. <p class="summary">{{ id|summary }}</p>
  7. {% for id in m.rsc[id].media %}
  8. {% include "_body_media.tpl" width=445 crop=1 align="block" %}
  9. {% endfor %}
  10. {% endif %}
  11. {% with m.search[{query cat='article' sort='-publication_start' pagelen=m.config.site.pagelen.value}] as result %}
  12. <div id="list-articles">
  13. {% for id in result %}
  14. {% include "_article_summary.tpl" id=id big=forloop.first %}
  15. {% endfor %}
  16. </div>
  17. {% ifequal m.config.site.pagelen.value result|length %}
  18. {% wire id="more-results" action={moreresults result=result target="list-articles" template="_article_summary.tpl"} %}
  19. <p><a href="javascript:void(0);" id="more-results">More results...</a></p>
  20. {% endifequal %}
  21. {% endwith %}
  22. {% endblock %}