PageRenderTime 14ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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