0
내 템플릿 파일 여기

MODX가 - "PAGETITLE"형제 자매

에 페이지를 형제로부터 정보를 추가 할 수있는 방법을 강구해야

에서 다른 정보를 얻기 파일 구조의 이미지입니다 (빨간색 항목은 형제입니다 정보를 whos 나는) 내 템플릿 내부에 접근 할 필요가 :

[[+total:isequalto=`1`:then=`<div class="equalHeightListItem full_width[[+idx:isequalto=`1`:then=` column-last`]]">`:else=``]][[+total:isequalto=`2`:then=`<div class="equalHeightListItem one_half[[+idx:isequalto=`2`:then=` column-last`]]">`:else=``]][[+total:isequalto=`3`:then=`<div class="equalHeightListItem one_third[[+idx:isequalto=`3`:then=` column-last`]]">`:else=``]][[+total:isequalto=`4`:then=`<div class="equalHeightListItem one_half[[+idx:isequalto=`2`:then=` column-last`]][[+idx:isequalto=`4`:then=` column-last`]]">`:else=``]] 
    <figure class="projectImg bwWrapper icon-box7"> 
     <a href="[[~[[+id]]]]"> 
      <div class="operations productImage" style="max-width: 100%; background-image: url('[[+tv.products.category.img]]')"></div> 
     </a> 
     <div class="projectDesc equalHeightListItemInner operations"> 
      <h4><a href="[[~[[+id]]]]">[[+menutitle:default=`[[+pagetitle]]`]]</a></h4> 
      <p>[[+introtext]]</p> 

      <div><a href="[[~[[+id]]]]" class="magicmore corpLink">Read More</a></div> 

      <!-- I need to add sibling info here --> 

     </div>     
    </figure> 
</div> 

모든 : 여기 enter image description here

내가 사용하고있는 TPL 파일 코드 도움이 대단히 감사합니다.

답변

3

저는 pdoResources (getResources과 비슷하지만 빠름)을 사용합니다. 이 코드를 대신 <!-- I need to add sibling info here -->에 삽입하면 도움이 될 것입니다.

[[pdoResources? 
    &parents=`[[+id]]` 
    &depth=`1` 
    &tpl=`your_sibling_row_tpl` 
]] 
관련 문제