gpt4 book ai didi

html - 在 TYPO3 中获取页面子项的内容

转载 作者:搜寻专家 更新时间:2023-10-31 21:49:44 25 4
gpt4 key购买 nike

我在 Mac 操作系统上使用 Typo3.6.4。

我想从子页面获取内容。内容在第 3 个子页面中,需要使用 TypoScript 在“页面”中显示:

页面

-子页 1

-子页面 2

-子页面 3

我在 Windows 的 Typo3.6.0 上尝试过这段代码,它可以正常工作。但不适用于 Mac OS 上的 Typo3.6.4。

  MIDBLOCK = CONTENT
MIDBLOCK {
stdWrap.wrap = |
table = pages
select.orderBy = sorting
# If this element is inserted as sitemap, consider the startingpoint
select.pidInList.if.isTrue.field = pages
select.pidInList.field = pages
renderObj = COA
renderObj {
stdWrap.wrap = |

10 = CONTENT
10.wrap = <div><h1>|</h1>
10 {
table = tt_content
select.pidInList.field = uid
select.where = colPos = 1
select.orderBy = sorting
renderObj = COA


#read the bodytext
renderObj.10 = TEXT
renderObj.10.field = header
}

20 = TEXT
20.value = Event
20.typolink.parameter.field = uid


# Title and link to the page
30 = TEXT
30.wrap = </div><div><h2>|</h2>
30.field = title
# 2. CONTENT object for reading the first content element
40 = CONTENT
40 {
table = tt_content
select.pidInList.field = uid
select.where = colPos = 0
select.orderBy = sorting
renderObj = COA


#read the bodytext
renderObj.10 = TEXT
renderObj.10 {
field = bodytext
#cut after 20 chars, keep whole words if possible
crop = 20| ... |1
}
}
# more link
50 = TEXT
50.wrap = <br /><br />|</div>
50.value = > [More]
50.typolink.parameter.field = uid
}
}

最佳答案

也许您已经通过

包含了您的 TypoScript
<INCLUDE_TYPOSCRIPT: source=FILE:EXT:my_ext/Configuration/TypoScript/setup.txt>

这在 TYPO3 6.2 中将不再有效。您必须像这样添加引号:

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_ext/Configuration/TypoScript/setup.txt">

关于html - 在 TYPO3 中获取页面子项的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24824994/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com