2017-05-04 19 views
4

私はこの enter image description hereCrafterCMSでは、反復グループの項目にICEを追加するにはどうすればよいですか?

のように私は、この単一の機能を編集するにはコンテキストの編集ポップアップを作ることができるようにしたいのですが、「機能」の繰り返しグループを持っています。あなたはグループとして個別にではなく編集可能にするための機能が欲しい場合

マイテンプレートのコードは、その後、彼らは、個々のコンポーネントとして定義する必要があり、CrafterCMSでこの

<#import "/templates/system/common/cstudio-support.ftl" as studio/> 

<div class="container about_content center p-b-3 wow fadeInUp" data-wow-duration="700ms" <@studio.componentAttr path=contentModel.storeUrl /> > 
    <div class="row"> 
    <#list contentModel.features.item as feature> 
     <div class="col-md-4" <@studio.iceAttr iceGroup="feature" path=contentModel.storeUrl label="Feature" /> > 
     <div class="single_abt single_about m-y-3"> 
      <i class="fa"> 
      <img src="${feature.logo}" /> 
      </i> 
      <h3>${feature.title}</h3> 
      <p>${feature.description!}</p> 
     </div> 
     </div> 
    </#list> 
    </div> 
</div> 

答えて

6

のようなものです。

バージョン3.0に付属して編集青写真を見てみましょう、それはICEタグとともにコンポーネントとしてレンダリングする機能のリストがあります:https://github.com/craftercms/studio/blob/master/src/main/webapp/repo-bootstrap/global/blueprints/website_editorial/templates/web/pages/home.ftl

注セクション:基本的に

<section <@studio.iceAttr iceGroup="features"/>> 
    <header class="major"> 
     <h2>${contentModel.features_title}</h2> 
    </header> 
    <div class="features" <@studio.componentContainerAttr target="features" objectId=contentModel.objectId/>> 
     <#if contentModel.features?? && contentModel.features.item??> 
      <#list contentModel.features.item as feature> 
       <@renderComponent component=feature /> 
      </#list> 
     </#if> 
    </div> 
</section> 

それは、コンポーネントを個別にレンダリングするコンポーネントのリストを反復処理します。

詳しくは、ドキュメントのICEを参照してください。http://docs.craftercms.org/en/3.0/developers/in-context-editing.html

関連する問題