Design:Postcategory.html
From Katapulta
(Difference between revisions)
m |
m (→Variabile) |
||
(2 intermediate revisions not shown) | |||
Line 15: | Line 15: | ||
<span class="x"> </span><span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span><span class="x"></span> | <span class="x"> </span><span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span><span class="x"></span> | ||
<span class="x"></ul></span> | <span class="x"></ul></span> | ||
- | |||
- | |||
</pre> | </pre> | ||
</div></html> | </div></html> | ||
Line 22: | Line 20: | ||
==Variabile== | ==Variabile== | ||
În template-ul ''post.html'' pot fi accesate următoarele variabile: | În template-ul ''post.html'' pot fi accesate următoarele variabile: | ||
- | * | + | * [[Design:Variabile#category|category]] - categoria curentă de articole din Blog |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
* toate [[Design:Variabile#Variabile globale|variabilele globale]] | * toate [[Design:Variabile#Variabile globale|variabilele globale]] |
Latest revision as of 14:13, 29 April 2011
Acest template afișează pagina unei categorii de articole din Blog-ul magazinului tău.
<h2><a href="{{ category.url }}">{{ category.title }}</a></h2>
<ul id="posts-for-category_{{ category.id }}">
{% for post in category.posts %}
<li>
<h4><a href="{{ post.url }}">{{ post.title }}</a></h4>
<p>
{{ post.content|nl2br|truncate(400) }}
<span class="readmore"><a href="{{ post.url }}">« citeste mai mult</a></span>
</p>
</li>
{% endfor %}
</ul>
Variabile
În template-ul post.html pot fi accesate următoarele variabile:
- category - categoria curentă de articole din Blog
- toate variabilele globale