Placeholder Conditional

The placeholder conditional statement can be used to render a section conditionally. The identifier of the placeholder will be shown in the design configuration overlay and is set by an expression.

Syntax

<? Placeholder identifier default expression ?>

The identifier must be surrounded by double quotes.

Example

<body>
    <!-- Body content -->
    <? Placeholder "Show logo" default true
        <div class="logo"></div>
    ?>
    <!-- Body content -->
    <? Placeholder "Show footer" default false
        <footer>...</footer>
    ?>
    <!-- Body content -->
</body>

Last updated

Was this helpful?