MTのエクスポート・インポート時の注意事項

この記事は公開から1年以上経過しており、内容が古くなっている可能性があります。

MTでカスタムフィールドをインポートしたのはいいのですが、空の場合なら表示しないというタグの
<mt:If tag=”entry_test” >
をつけているのに、なぜか空でも中身を表示してしまう。
 
<mt:If tag=”entry_test” >
テスト:<mt:entry_test>
</mt:If>
 
とすると、entry_testの内容が空のはずなのに
テスト:
と表示されてしまいます。
 
なぜだ!
 
さっそくググってみると、こちらに原因と対策方法が書いてありました。
 
どうやらインポート時に余計な半角スペースが入ってしまうようです。
MTの仕様上、しかたないようですが。
というわけでmt:Ifの記述に以下を追加します。
<mt:If tag=”entry_test” strip_linefeeds=”1″ trim=”1″ >
 
これで半角スペースが入っていても万事解決です!

コメント

  1. Poker online より:

    Howdy could you head enabling me personally understand which in turn hosting company you’re working with? I’ve loaded your website » MTのエクスポート・インポート時の注意事項ダリの雑記:WEBプログラム版 inside 3 various internet browsers and i also should declare this website a lot faster next many. Could you recommend an excellent host company with a reasonable price? Cheers, My spouse and i appreciate it!.Poker online https://www.feraripoker.org/

タイトルとURLをコピーしました