三月 13, 2006

[模版] 摘要頁 ( 教師研習中心版 ) 解析及修改

如果要對摘要頁進行修改!要對 template 資料夾內的 summary 資料夾內的檔案進行調整。

例如讓 摘要頁中的最新文章顯示真實作者的姓名!

修改前是顯示代號



index.template

嵌入header.template (頁頭)

(其中嵌入 recent.template、 announces.template)

嵌入 footer.template(頁尾)


程式解說:

在 index.template 中顯示「最活躍網誌」的程式碼

{foreach from=$activeBlogs item=blog}
<tr><td>
{assign var="url" value=$blog->getBlogRequestGenerator()}
<img src="images/topicon.gif"><a href="{$url->blogLink()}">{$blog->getBlog()|strip_tags}</a>
</td></tr>
{/foreach}


在摘要頁中的文章要顯示真實姓名!

只要修改 post.template

搜尋

{$postOwner->getUsername()}

改成

{$postOwner->getfullName()}


發佈者: 陳怡杰 老師 at 12:05│  點閱次數 (532)│ 修改文章管理迴響迴響 (0)部落格學習筆記
回應文章
(必要)
authimage