0
0

More than 1 year has passed since last update.

Modx 覚書

Posted at

スニペット

新着情報自動取得

Dittoスニペット

 [[Ditto?startID='新着情報ファルダのID' &orderBy='pub_date DESC' &display='20' &tpl=`index_news_item` ]] 

//Dittoスニペット 複数のファルダから取得(カテゴリ別けと同じ)
 [[Ditto?startID='28,29,30,31,32' &orderBy='pub_date DESC' &display='20' &tpl=`index_news_item` ]]

表示テンプレート用のチャンク例

<div class="news_item">
      <div class="news_cate">
            <span class="news_cate_icon [[the_page_alias &id=[+parent+]]]_bg">[[the_page_title &id=[+parent+]]]</span>
      </div>
      <div class="news_date">
            <time>[+pub_date:ifempty=`[+publishedon+]`:date=`%Y年%-m月%-d日`+]</time>
      </div>
      <div class="news_title">
            <a href="[+url+]">[+title+]</a> 
            [[the_post_new? &date=[+pub_date:ifempty=`[+publishedon+]`:date=`%Y-%m-%d`+]]]
      </div>
 </div>

よく使う[リソース変数]

head内タイトル

[pagetitle]
[(site_name)]

エディター内コンテンツ

[content]

0
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
0
0