MT5::コメントにカスタムフィールドで項目追加

ついにMT5のコメント用カスタムフィールドで、入力フォーム用のタグが掲載されたようだ。

http://www.movabletype.jp/documentation/mt5/design/template/mt5-tags.htmlLink

「フォームフィールド」ってテンプレートモジュールは…。

良く分からないが変わりに、フィールドを生成するタグを入れてみた。

MTCustomFieldHTMLLink

テンプレートモジュール「コメント」に下のコードを追加する。

<input type="hidden" name="blog_id" value="<MTBlogID>" />
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
<mt:CommentCustomFields>
<mt:SetVarBlock name="custom_field_name"><$mt:CustomFieldName$></mt:SetVarBlock>
<mt:SetVarBlock name="field-content"><$mt:CustomFieldHTML$></mt:SetVarBlock>
<mt:SetVarBlock name="custom_field_id">profile_<$mt:CustomFieldName dirify="1"$></mt:SetVarBlock>

<label><$MTCustomFieldName$>(<$MTCustomFieldDescription$>):</label> <$MTCustomFieldHTML$>

<mt:Ignore>
<$mt:Include module="フォームフィールド" id="$custom_field_id" class="" label="$custom_field_name"$>
</mt:Ignore>

</mt:CommentCustomFields>

テンプレートモジュール「コメント詳細」に下のコードを追加する。

<mt:If tag="CommentData">
新規フィールド: <mt:CommentData>
</mt:If>

コメントのプレビューも作らないとなぁ…。

テキストは良いけど、ラジオボタンとチェックボックス、セレクタなどが面倒だろうか。

CMS

— posted by giyu at 07:42 pm  

T: Y: ALL:
Created in 0.0147 sec.
prev
2009.9
next
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30