2017-05-22 16 views
0

마스크 확장의 CE 요소에서 배경 이미지 나 색상을 얻으려고합니다.TYPO3 마스크 CE 배경 이미지

이것은 출력하지만 이미지가없고 배경색이 없기 때문에 얻는 것입니까? 내가 여기서 잊어 버린 것은 무엇입니까? OK 모두가 나에게 보인다 :)

<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> 
+1

왜 사용하지 않는에 대한 모든 paramters을 설정'{F : uri.image (이미지 : 파일)}'대신 UID와 복잡한 처리의? –

+0

은 다음과 같습니다 : : style = "background-image : url ('{f : uri.image (image : file)}') no-repeat 중심점? –

+0

예, 짧고 덜 복잡합니다 –

답변

2
<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;"> 

할 당신이 원하는 배경 이미지 만 설정하거나 당신은 또한의 형식화하는 및 위치를 설정하고자 할 배경 이미지?
당신은 background-image:로 시작하지만 background:

+0

아, 그거 고마워, 표본의 일부를 복사했는데 배경 이미지가 차이를 만든다는 사실을 알지 못했다. 하, 하, 일상적으로 배우기. –