Last active
February 13, 2018 14:04
-
-
Save fjm/4275906 to your computer and use it in GitHub Desktop.
[Movable Type - config] Movable Type案件でウェブサイトのテンプレートモジュールに登録しておいて全テンプレで読み込むconfigファイル #movabletype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`config`というテンプレート・モジュール名で、所属するウェブサイトに登録しておく | |
``` | |
<mt:Ignore> ============================== | |
- WebSite | |
</mt:Ignore> | |
<mt:BlogParentWebsite> | |
<$mt:WebsiteName setvar="WebsiteName"$> | |
<$mt:WebsiteURL setvar="WebsiteURL"$> | |
<$mt:WebsiteID setvar="WebsiteID"$> | |
<$mt:WebsiteDescription setvar="WebsiteDescription"$> | |
</mt:BlogParentWebsite> | |
<mt:Ignore> ============================== | |
- Blog | |
</mt:Ignore> | |
<$mt:BlogName setvar="BlogName"$> | |
<$mt:BlogURL setvar="BlogURL"$> | |
<$mt:BlogID setvar="BlogID"$> | |
<$mt:BlogDescription setvar="BlogDescription"$> | |
<mt:Ignore> ============================== | |
- 同一サイト内のブログID調査 | |
</mt:Ignore> | |
<mt:Blogs include_blogs="site" include_with_website="1"> | |
<mt:If tag="BlogName" eq="[ブログ名]"><$mt:BlogID setvar="BlogID_A"$></mt:If> | |
</mt:Blogs> | |
<mt:Ignore> ============================== | |
- Entry | |
- ブログ記事全件数を取得 | |
mt:Ignore> | |
<mt:If name="category_archive"> | |
<$mt:CategoryCount setvar="EntryCount"$> | |
<mt:Else> | |
<$mt:BlogEntryCount setvar="EntryCount"$> | |
</mt:If> | |
<mt:Ignore> ============================== | |
# SetVars | |
- 定数系を一括で定義 | |
</mt:Ignore> | |
<mt:SetVars> | |
resize_image=100 | |
</mt:SetVars> | |
``` | |
以下でテンプレートで読み込む | |
``` | |
<$mt:Include module="config" parent="1"$> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment