Skip to content

Navigation Menu

Sign up
This repository was archived by the owner on Mar 8, 2021. It is now read-only.

@IF @ELSEIF @ELSE @ENDIF

yamamoto edited this page Dec 2, 2016 · 5 revisions
<@IF:[*template:is(0)*] >
 Template is blank
<@ELSE>
 Template is [*template:templatename*]
 <@IF:[*description:isNotEmpty*]>
 [*description*]
 <@ENDIF>
<@ENDIF>

or

<!--@IF:[*template:is(0)*] -->
 Template is blank
<!--@ELSE-->
 Template is [*template:templatename*]
 <!--@IF:[*description:isNotEmpty*]-->
 [*description*]
 <!--@ENDIF-->
<!--@ENDIF-->

or

<!--@IF:[*template:is(0)*] >
 Template is blank
<@ELSE>
 Template is [*template:templatename*]
 <@IF:[*description:isNotEmpty*]>
 [*description*]
 <@ENDIF>
<@ENDIF-->

(For html editor)

It is useful for creating pages with complicated structure such as management screen. Previously, when such a branching process was necessary, it was necessary to create many chunks.

Determine the presence or absence of a value. Therefore, a combination with a modifier is effective.

https://github.com/modxcms/evolution/blob/v1.2/assets/plugins/elementsintree/assets/on_manager_tree_render.tpl
Actual sample

https://github.com/modxcms/evolution/blob/v1.2/manager/media/style/MODxRE2/welcome.tpl#L56-L61
"or", "and" can be used.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /