Last active
November 16, 2020 03:05
-
-
Save webbingstudio/ea0bc0946f4175d0664e59f66509a6a7 to your computer and use it in GitHub Desktop.
MovableType.netでカスタムブロックの複数項目の値を変数に置換する
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
<mt:Ignore> | |
# ======================= | |
# | |
# カスタムブロック-高度なテーブル | |
# | |
# vars: | |
# __table_html__ | |
# __table_type__ | |
# __table_class__ | |
# | |
# ======================= | |
</mt:Ignore> | |
<mt:SetVar name="__table_html__" value="" /><mt:SetVar name="__table_type__" value="" /><mt:SetVar name="__table_class__" value="" /> | |
<mt:BlockEditorBlocks> | |
<mt:If name="type" eq="sixapart-select"> | |
<mt:SetVarBlock name="__table_type__"><mt:Var name="__value__" /></mt:SetVarBlock> | |
<mt:ElseIf name="type" eq="core-table"> | |
<mt:SetVarBlock name="__table_html__"><mt:Var name="__value__" /></mt:SetVarBlock> | |
</mt:If> | |
</mt:BlockEditorBlocks> | |
<mt:SetVar name="__table_class__" value="echo-mt-be-table-default" /> | |
<mt:If name="__table_type__" eq="スクロールを促す"> | |
<mt:SetVar name="__table_class__" value="echo-mt-be-table-scrollable js-scrollable" /> | |
<mt:ElseIf name="__table_type__" eq="縦並びになる"> | |
<mt:SetVar name="__table_class__" value="echo-mt-be-table-fold" /> | |
</mt:If> | |
<div class="echo-mt-be-table <mt:Var name="__table_class__" />"><mt:Var name="__table_html__" /></div> |
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
<mt:Ignore> | |
# ======================= | |
# | |
# ページ(一部) | |
# | |
# ======================= | |
</mt:Ignore> | |
<mt:BlockEditorBlocks tag="PageBody"> | |
<mt:If name="type" eq="custom-echo_table"> | |
<mt:Include module="カスタムブロック-高度なテーブル" /> | |
<mt:Else> | |
<mt:Var name="__value__" /> | |
</mt:If> | |
</mt:BlockEditorBlocks> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment