mtde.info

Movable Type Developers Express

(システム)コメント完了のテンプレート

2008年2月23日 20:48 | Writer: apstar | 記事本文

システムテンプレート>コメント完了のテンプレート記述例です。

ファイル名:comment_response.mtml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<MTIgnore>変数宣言</MTIgnore>
<MTSetVar name="system_template" value="1">
<MTSetVar name="comment_response_template" value="1">

<MTIf name="body_class" eq="mt-comment-confirmation">
    <MTSetVarBlock name="page_title">投稿されたコメント</MTSetVarBlock>

    <MTSetVar name="heading" value="確認">

    <MTSetVarBlock name="message">
    <p>コメントを投稿しました。</p>
    </MTSetVarBlock>
</MTIf>

<MTIf name="body_class" eq="mt-comment-pending">
    <MTSetVarBlock name="page_title">コメント保留中</MTSetVarBlock>

    <MTSetVar name="heading" value="コメントありがとうございます。">

    <MTSetVarBlock name="message">
    <p>コメントは現在承認されるまで公開を保留されています。</p>
    </MTSetVarBlock>

</MTIf>

<MTIf name="body_class" eq="mt-comment-error">
    <MTSetVarBlock name="page_title">コメント投稿エラー</MTSetVarBlock>

    <MTSetVar name="heading" value="$page_title">

    <MTSetVarBlock name="message">
    <p>コメントの投稿に失敗しました:</p>
    <blockquote>
        <$MTErrorMessage$>
    </blockquote>
    </MTSetVarBlock>
</MTIf>

<MTSetVarBlock name="title"><$MTBlogName encode_html="1"$>: <$MTGetVar name="page_title"$></MTSetVarBlock>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja" id="sixapart-standard">

<$MTInclude module="mdlMeta"$>

<body<MTIf name="body_onload"> onload="<$MTGetVar name="body_onload"$>"</MTIf>>

   <$MTInclude module="ヘッダー"$>

   <div id="maincontainer">

      <div id="maincontent">
         <h2><$MTGetVar name="heading"$></h2>
         <$MTGetVar name="message"$>
         <p><a href="<$MTEntryLink$>">元のブログ記事</a>に戻る</p>
      </div>

      <$MTInclude module="サイドバー"$>
      <$MTInclude module="mdlExtra"$>

   </div>

   <$MTInclude module="フッター"$>

</body>
</html>

以下、特記事項です。

テンプレートの作成例

2008 mtde.info