LifeType 中文開發論壇

支援 => 安裝與設定 => 主題作者是: jan 於 九月 26, 2005, 10:40:58 上午



主題: printview.template 如何加上回到原始文章的功能
作者: jan九月 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



主題: Re: printview.template 如何加上回到原始文章的功能
作者: markwu九月 27, 2005, 10:53:11 上午
不就是這樣嗎?

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

請參考: post.template

Mark