Content management system MODX-获取;pagetitle";以及来自兄弟姐妹的其他信息
我需要找到一种方法将同级页面中的信息添加到模板文件中 以下是文件结构的图像(红色项目是我需要在模板中访问的兄弟姐妹的信息): 以下是我正在使用的tpl文件代码:Content management system MODX-获取;pagetitle";以及来自兄弟姐妹的其他信息,content-management-system,modx,modx-revolution,modx-templates,Content Management System,Modx,Modx Revolution,Modx Templates,我需要找到一种方法将同级页面中的信息添加到模板文件中 以下是文件结构的图像(红色项目是我需要在模板中访问的兄弟姐妹的信息): 以下是我正在使用的tpl文件代码: [[+total:isequalto=`1`:then=`<div class="equalHeightListItem full_width[[+idx:isequalto=`1`:then=` column-last`]]">`:else=``]][[+total:isequalto=`2`:then=`<div
[[+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>
[introtext]]
非常感谢您的帮助。我使用
pdoResources
(类似于getResources
,但速度更快)。将此代码改为
,这样会有所帮助
[[pdoResources?
&parents=`[[+id]]`
&depth=`1`
&tpl=`your_sibling_row_tpl`
]]
我使用
pdoResources
(类似于getResources
,但速度更快)。将此代码改为
,这样会有所帮助
[[pdoResources?
&parents=`[[+id]]`
&depth=`1`
&tpl=`your_sibling_row_tpl`
]]