[pLog-svn] r557 - plog/trunk/templates/standard
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Wed Dec 22 12:47:13 GMT 2004
Author: oscar
Date: 2004-12-22 12:47:12 +0000 (Wed, 22 Dec 2004)
New Revision: 557
Modified:
plog/trunk/templates/standard/main.template
Log:
if there is a $category object available, show it in the title page
Modified: plog/trunk/templates/standard/main.template
===================================================================
--- plog/trunk/templates/standard/main.template 2004-12-22 06:25:04 UTC (rev 556)
+++ plog/trunk/templates/standard/main.template 2004-12-22 12:47:12 UTC (rev 557)
@@ -1,25 +1,27 @@
{include file="$blogtemplate/header.template"}
- {if $showAll == 1 }<h2>{$locale->tr("posts")}</h2>{/if}
+ {if $showAll == 1 && $category}<h2>{$locale->tr("posts")}: {$category->getName()}</h2>{/if}
-{foreach from=$posts item=post}
-{if $showAll}
- <!-- showing only the topic of the post, in case we have too many! -->
+{foreach from=$posts item=post}
+{if $showAll}
+ <!-- showing only the topic of the post, in case we have too many! -->
<h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
<div>
{$post->getText()|strip_tags|truncate:300:"...":false}
</div>
<p class="footer">
-{assign var="postCategory" value=$post->getCategory()}
-<a href="{$url->postCategoryLink($post)}">{$postCategory->getName()}</a>
-</p>
-{else}
- <!-- show the whole post, as we would normally do -->
- {include file="$blogtemplate/post.template"}
-{/if}
+{foreach name=categories from=$post->getCategories() item=postCategory}
+ <a href="{$url->categoryLink($postCategory)}">{$postCategory->getName()}</a>
+ {if !$smarty.foreach.categories.last}, {/if}
{/foreach}
+</p>
+{else}
+ <!-- show the whole post, as we would normally do -->
+ {include file="$blogtemplate/post.template"}
+{/if}
+{/foreach}
{include file="$blogtemplate/footer.template"}
\ No newline at end of file
More information about the pLog-svn
mailing list