Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates Typo3 OnePager使用Fluidtemplate加载内容_Templates_Typo3_Typoscript - Fatal编程技术网

Templates Typo3 OnePager使用Fluidtemplate加载内容

Templates Typo3 OnePager使用Fluidtemplate加载内容,templates,typo3,typoscript,Templates,Typo3,Typoscript,我正在用这个工具创建一个Typo3 OnePager网站。它将根页面的所有子页面作为OnePager中的节加载。这项工作如前所述,但它仅直接从tt_内容加载内容,而不是通过Fluidtemplate加载内容。我希望它与Fuildtemplate一起加载,因为我有几个不同的模板可以在后端选择 因此,加载内容和模板的整个TS如下所示: lib.sectionContent=humenu lib.sectionContent{ 1=t菜单 1 { 否=1 没有{ doNotLinkIt=1 stdW

我正在用这个工具创建一个Typo3 OnePager网站。它将根页面的所有子页面作为OnePager中的节加载。这项工作如前所述,但它仅直接从tt_内容加载内容,而不是通过Fluidtemplate加载内容。我希望它与Fuildtemplate一起加载,因为我有几个不同的模板可以在后端选择

因此,加载内容和模板的整个TS如下所示:

lib.sectionContent=humenu
lib.sectionContent{
1=t菜单
1 {
否=1
没有{
doNotLinkIt=1
stdWrap>
stdWrap{
cObject=COA
科宾特{
if.value=4
if.equals.field=doktype
if.negate=1
10<温度标题部分ID
10.1
20=内容
20}
如您所见,查询中的列没有值:

[...] WHERE (tt_content.pid IN (1)) AND (colPos =) AND [...]
                                                 ^
当您检查建立查询的位置时:

lib.sectionContent = HMENU
lib.sectionContent {
  1 = TMENU
  1 {
    NO = 1
    NO {
      stdWrap {
        cObject = COA
        cObject {
          20 = CONTENT
          20 {
            select.where.field = column
            select.where.wrap = colPos = |
            :
您可以看到上下文是一个TMENU。这里有一个
页面
记录作为当前数据。在
页面中
没有字段

您可以将
lib.sectionContent
更改为具有第一个条目的COA,以将“参数”
column
存储到寄存器中,稍后可以将其用作
register:column

lib.sectionContent = COA
lib.sectionContent {
  10 = LOAD_REGISTER
  10 {
    column.cObject = TEXT
    column.cObject.field = column
  }
  20 = HMENU
  20 {
    :
          select.where.data = register:column
          select.where.wrap = colPos = |
    :

您正在查询模板名!为什么得到一个简单的名字这么复杂?看起来你混合了名字和内容。是的,你是对的。我已经更改了TS,因此lib.sectionContent应该加载内容,然后lib.mainTemplate应该从后端获取模板名称。我在我的帖子中更新了它。我想我搞错的部分是wehre,我实际上加载了带有style.content.get的内容,但我不知道如何修复它。谢谢,现在内容显示在FE上了。问题是,它重复根页面的内容的次数与重复子页面的次数相同。例如,我在根页面下面有3个子页面。因此,它显示的内容是根页面内容的3倍,而不是子页面。我猜它是从数据库加载内容的。我需要告诉TS我需要具有特定UID的内容吗?在您的select(检查TSOB中的
20
)中,您没有单独的
pid
值,该值应该是当前页面(TMENU上下文)的
pid
,那么我如何能够使用Fuildetemplate创建一个OnePager?我想这是可能的?我需要另一个对象而不是TMENU吗?还是在模板中使用视图帮助程序创建OnePager样式?您需要更改“选择”属性。使用TSOB检查
pidInList
的条目。您需要类似于
pidInList.field=uid
(您处于菜单“当前”页面的上下文中)的内容,因此我检查了pidInList条目。它向我展示了pidInList出现的三个条目。tt_content.menu_categorized_content.dataProcessing.10.pidInList.data=leveluid:0,然后tt_content.menu_section.dataProcessing.10.dataProcessing.20.pidInList.field=uid,最后tt_content.menu section_pages.dataProcessing.10.dataProcessing.20.pidInList.field=uid。我想这是我第一个需要改变的,但是我知道怎么做。