歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 29, 2024, 12:20:11 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  printview.template 如何加上回到原始文章的功能 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: printview.template 如何加上回到原始文章的功能  (閱讀 5989 次)
jan
新手見習
*
文章: 5


檢視個人資料
« 於: 九月 26, 2005, 10:40:58 上午 »

以下程式碼是plog 舊版的 printview.template 程式碼

請問如何再加入回到原始文章的功能(請看圖片說明)

查了 article API函數找不到如何得到 URL 的方法,試了半天搞不定

請幫忙!




<html>
 <head>
<meta http-equiv="Content-Type" content="text/html;charset={$locale->getCharset()}" />
  <style type="text/css" media="print,screen">
   {literal}
   body {
    margin-top: 1.5cm;
    margin-left: 2cm;
    margin-right: 2cm;
    margin-bottom: 1.5cm;
   }
   h1 {
    font-size: 18pt;
    font-weight: bold;
    text-align: right;
    border-bottom: 2px solid black;
    background-color: #f7e7ff
   }
   .text {
    font-size: 10pt;
   }
   .author {

   }
   .date {

   }
   {/literal}
  </style>
  </style>
  <p><a href="http://www.vba.com.tw/plog">
<img border="0" src="http://vba.com.tw/plog/templates/pastel-blocks/home.gif" width="70" height="20"></a></p>

  <title>{$article->getTopic()}</title>
 </head>
 <body>
      <h1><b>{$article->getTopic()}</b></h1>
   {assign var="date" value=$article->getDateObject()}
  <span class="date">{$locale->formatDate($date, "%A, %D %B %Y")}
  <p>作者保留此著作部分權利,<a href="http://creativecommons.org/licenses/by-nc-sa/2.0/tw/">
採CC授權。</a></p>
   <p class="text">{$article->getText()}</p>
 </body>
</html>

網址:
http://www.vba.com.tw/plog/print.php?articleId=227&blogId=1

已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #1 於: 九月 27, 2005, 10:53:11 上午 »

不就是這樣嗎?

<a href="{$url->postPermalink($article)}">{$article->getTopic()}</a>

請參考: post.template

Mark
已記錄

頁: [1]
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  printview.template 如何加上回到原始文章的功能 « 上篇主題 下篇主題 »
    前往: