【发布时间】:2018-04-04 15:28:54
【问题描述】:
我是打字新手。我试图从存档页面上的某些子页面呈现内容。
我不确定为什么我的代码什么也不显示。
首先我试图遍历我的子页面
在该代码中
stdWrap.wrap = <div class="row"> | </div>
table = pages
select {
orderBy = sorting
# If this element is inserted as sitemap, consider the startingpoint
pidInList.field = uid
#max = 1
begin = 0
}
其次,我正在遍历我的 tt_content 表并尝试获取列标题的值并将其呈现在我的存档页面上。
代码一直有效,直到
<div class="row"> | </div>
完整代码在这里:
lib.content = COA
lib.content {
stdWrap.wrap = <div class="row"> | </div>
table = pages
select {
orderBy = sorting
# If this element is inserted as sitemap, consider the startingpoint
pidInList.field = uid
#max = 1
begin = 0
}
renderObj = COA
renderObj {
stdWrap.wrap = <div class="testfestinner"> | </div>
10 = CONTENT
10.wrap = <h3>|</h3>
10 {
table = tt_content
select {
pidInList.field = uid
where = colPos = 212
orderBy = sorting
}
renderObj = COA
renderObj.10 = TEXT
renderObj.10.field = header
}
}
}
我不确定在哪里以及如何调试该代码。 提前致谢。
【问题讨论】:
-
如果您有更好的想法来创建存档页面。请告诉我。
-
正如乔伊所说:你的
lib.content需要是CONTENTobject。您的外部CONTENT对象的替代方法可以是HMENU(任何页面/页面uid 列表都可以是菜单),您可以在其中添加内部CONTENT。亲:你甚至可以在一个页面树中组织你的档案,而不是在一个层次上一长串子页面。
标签: typo3 typoscript typo3-8.x