啊﹗很久沒上來了,是該把修改的內容分享給大家,當時沒想到。sorry!
我是使用connections模板作修改的,所以main.template修改成
{include file="$blogtemplate/header.template"}
<div id="content">
{if empty($showAll)}
{if $stickyposts->isEnabled()}
{assign var=stickys value=$stickyposts->getArticles('announce')}
{foreach from=$stickys item=stickypost}
{assign var="stickysDate" value=$stickypost->getDateObject()}
{assign var="stickysOwner" value=$stickypost->getUserInfo()}
<div class="post">
<p class="post-date">{$locale->formatDate($stickysDate,"%d %B, %Y, %H:%M")} </p>
<div class="post-info">
<h2 class="post-title"><a href="{$url->postPermalink($stickypost)}" rel="bookmark" title="Permanent Link: {$stickypost->getTopic()}"> {$stickypost->getTopic()} </a></h2>
Posted by {$stickysOwner->getUsername()} under
{assign var=stickyCategory value=$stickyposts->getCategory('announce')}
[<a href="{$url->categoryLink($stickyCategory)}">{$stickyCategory->getName()}</a>]
<br/>[<a href="{$url->postPermalink($stickypost)}"> ({$stickypost->getTotalComments()}) {$locale->tr("comment on this")} </a>] | [<a href="{$url->postTrackbackStatsLink($stickypost)}"> ({$stickypost->getNumTrackbacks()}) {$locale->tr("trackbacks")} </a>]
<div class="post-content">
{$stickypost->getText()}
<div class="post-footer"> </div>
</div>
</div>
</div>
{/foreach}
{/if}
{/if}
</div>
{include file="$blogtemplate/panel.template"}
{include file="$blogtemplate/footer.template"}
而panel.template則增加一段
<h2>Main Menu</h2>
<ul>
{if empty($showAll)}
{if $stickyposts->isEnabled()}
{assign var=stickys value=$stickyposts->getArticles('sticky')}
{foreach from=$stickys item=stickypost}
<li><a href="{$url->postPermalink($stickypost)}"> {$stickypost->getTopic()} </a></li>
{/foreach}
{/if}
{/if}
</ul>