我正在尝试在 Mask 扩展中的 CE 元素中获取背景图像或颜色。
这就是我得到的输出但没有图像和背景颜色?我在这里错过了什么?对我来说似乎一切都好:)
<div id="c71" class="csc-default">
<section class="test_one" style="background-image: url('fileadmin/_processed_/c/6/csm_pizza_uit_de_kleine_pizzajolly_pizzaoven_campegio_eb7fa491f7.jpg') no-repeat center center; background-size: cover;">
<div class="row wrap">
<div class="large-12 small-12 columns">content</div>
</div>
</section>
</div>
</section>
这是在我的模板中:
<f:if condition="{data.tx_mask_achtergrond_afbeelding}">
<f:then>
<f:for each="{data.tx_mask_achtergrond_afbeelding}" as="file">
<section class="<f:if condition="{data.tx_mask_class_name}">{data.tx_mask_class_name}</f:if>"
style="background-image: url('{f:uri.image(src: file.uid, treatIdAsReference: 1)}') no-repeat center center; {data.tx_mask_kleur_actergrond}; background-size: cover;">
<!-- if content CE than: -->
<div class="row wrap">
<div class="large-12 small-12 columns"><!-- content element here: text / button -->content</div>
</div>
</section>
</f:for>
</f:then>
<!-- if no background image than background-color and content CE-->
<f:else>
<section class="class-name"
style=background-color:"<f:if condition="{data.tx_mask_kleur_actergrond}">
{data.tx_mask_kleur_actergrond}
</f:if>
;">
<!-- if content CE than: -->
<div class="row wrap">
<div class="large-12 small-12 columns"><!-- content element here: text / button --></div>
</div>
</section>
</f:else>
</f:if>