Design:Postcategory.html
From Katapulta
(Difference between revisions)
m |
m (→Variabile) |
||
(One intermediate revision not shown) | |||
Line 20: | 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