Power CMS X 記事を公開日でソートする

Power CMS X 公開日でソートする

 
  • exclude_idsは除外したいID
  • sort_byはソート条件
  • sort_orderは降順、昇順
 
  <mt:entries exclude_ids="1,2,3" sort_by="published_on" sort_order="descend">
    <mt:entrytitle />
  </mt:entries>
  

Power CMS XのAPIでトークンをどこにつけるのさ! (X-PCMSX-Authorization)

X-PCMSX-Authorization これをheaderに入れて値はAPI Tokenを入れればOKだった。 

ドキュメント見てもほとんど記載がなくて探すのに苦労した・・・

「認証付きリクエスト」って記載はあるけど、ドキュメント載ってないよね?

下記がインサートサンプル
----
curl --location 'http://hogehoge.co.jp/api/v1/1/entry/insert' \
--header 'X-PCMSX-Authorization: tokentokentokentokentokentokentoken' \
--header 'Content-Type: application/json' \
--data '{
    "title": "Welcome!",
    "text": "本文本文本文本文本文本文本文本文",
    "text_format": "richtext",
    "assets": [
        {
            "id": 26
        }
    ],
    "excerpt": "Our StoryLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
    "categories": [
        {
            "id": 1
        }
    ],
    "tags": [
        {
            "id": 6
        }
    ],
    "basename": "powercmsx",
    "status": 4,
    "has_deadline": 0,
    "published_on": "2021-09-01 12:47:46",
    "allow_comment": 0
}'
----

#Power CMS X
#API
#Token
#Key
#Authorization

SonomaにアップデートするとXcode 14以前が起動できなかった・・・

絶望しました・・・。

でも、回避する方法がありまして、

.appの中にある、実行ファイルをターミナルから起動するだけで良いのです。

Macで隠しファイルや隠しフォルダーを表示する

terminal

有効にしたい時

% defaults write com.apple.finder AppleShowAllFiles TRUE
% killall Finder

無効にしたい時

% defaults write com.apple.finder AppleShowAllFiles FALSE
% killall Finder