LoginSignup
1
0

More than 5 years have passed since last update.

a-blog cmsのカスタムフィールドの値を使って表示結果をコントロールする

Last updated at Posted at 2017-12-02

a-blog cmsのカスタムフィールドの値を使って表示結果をコントロールする方法の覚書

 【何をしたいのか】

Entryの一覧をサイトのトップにランダムで表示したいけど、一部のエントリーは表示させてくない場合など 

 【手順】

1.Entryにカスタムフィールドを作成する。(チェックボックス、ラジオボタンなど)
2.EntryBody等のモジュール設定画面にある引数設定を設定する
3.フィールドの入力エリアに「カスタムフィールド名/演算子/値」
 ※演算子は、IFブロックのオプションを参考に設定
 https://developer.a-blogcms.jp/document/template/if.html

スクリーンショット 2017-12-02 13.20.05.png

例:displayフィールドにonが入っている記事を表示したい場合
  ・カスタムフィールド名:display
  ・値:on
  ・記載方法: display/eq/on 

例:displayフィールドが空の記事を表示したい場合
  ・カスタムフィールド名:display
  ・記載方法: display/em/ ※エンドの/を忘れずに!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0