剛才是了一下, 不過效果沒出來不知道是不是我哪裡做錯了, 可否幫我看一下, 謝謝!!
{* show comments *}
<h3 id="comments">{$post->getTotalComments()} Comments on "{$post->getTopic()}"</h3>
<ol class="commentlist">
{assign var=comments value=$nestedcomments->getNestedComments($post)}
{foreach name=comment from=$comments item=comment}
<div class="comment_{$comment->getValue("depth")}">
<li class="alt" id="comment-{$comment->getId()}">
{$locale->tr("posted_by")}
{if $comment->getUserUrl() != ""}
<cite><a href="{$comment->getUserUrl()}"}>{$comment->getUsername()}</a></cite>
{else}
<cite>{$comment->getUsername()}</cite>
{/if}
<a name="{$comment->getId()}"></a>
{$comment->getTopic()} [<a href="{$url->postPermalink($post)}#NewComment"> {$locale->tr("reply")} </a>]<br />
<small class="commentmetadata">{assign var=commentDate value=$comment->getDateObject()} {$locale->formatDate($commentDate, "%d/%m/%Y, %H:%M")}</small>
<p>{$comment->getText()}</p>
</li>
</div>
{/foreach}
</ol>
css的部分我加進了
.comment_1 {
margin-left: 10px;
}
.comment_2 {
margin-left: 20px;
}
.comment_3 {
margin-left: 30px;
}
.comment_4 {
margin-left: 40px;
}
.comment_5 {
margin-left: 50px;
}
.comment_6 {
margin-left: 60px;
}