Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/152.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
Menu Typo3将所有子页面的内容列为父页面的内容_Menu_Parent Child_Typo3_Typoscript - Fatal编程技术网

Menu Typo3将所有子页面的内容列为父页面的内容

Menu Typo3将所有子页面的内容列为父页面的内容,menu,parent-child,typo3,typoscript,Menu,Parent Child,Typo3,Typoscript,正如标题所说,我需要在父页面上的所有子页面的内容之后列出它自己的内容。或者我真正需要的是,一个包含内容的页面和一个链接到不同内容标题的菜单。e、 g.包含内容的父页面: **Parent Head** parent text *first subhead* first subtext *second subhead* second subtext 菜单应该如下所示: 母公司 -第一分目 -第二分目 我认为如果父页面收集子页面的内容会更容易。 另一种解决方案是,子页面将是指向外部URL的链接,指

正如标题所说,我需要在父页面上的所有子页面的内容之后列出它自己的内容。或者我真正需要的是,一个包含内容的页面和一个链接到不同内容标题的菜单。e、 g.包含内容的父页面:

**Parent Head**
parent text
*first subhead*
first subtext
*second subhead*
second subtext
菜单应该如下所示:

母公司

-第一分目

-第二分目

我认为如果父页面收集子页面的内容会更容易。 另一种解决方案是,子页面将是指向外部URL的链接,指向父页面不同内容的特定c-ID。但我认为这对网站所有者来说并不容易,他不知道在网页源代码中哪里可以找到正确的c-ID。 那你是怎么做到的?或者,我如何实现子页面内容的功能

编辑:现在有一个解决方案。只需修复,子菜单将显示没有子页面。 代码如下:


有一个内容元素菜单/站点地图,其中包含一个选项,可以使用内容呈现子页面

如果要通过打字脚本执行此操作,请渲染菜单,然后用菜单项的内容替换菜单项

  # Pseudocode on menuitem
  # assuming you are using css_styled_content
  1.allStdWrap.cObject < styles.content.get
  # Set pid for CONTENT object from styles.content.get to the uid of the page
  # which gets rendered
  1.allStdWrap.cObject.select.pidInList.data = uid

无法为您提供可用的代码段自动取款机。

请尝试类似的方法

temp.pageIds = HMENU 
temp.pageIds.entryLevel = 1 
temp.pageIds.1 = TMENU 
temp.pageIds.1 { 
  NO.stdWrap.field = uid 
  NO.allWrap = |, 
  NO.doNotLinkIt = 1 
} 
lib.container = CONTENT 
lib.container.table = tt_content 
lib.container.select { 
  pidInList.cObject < temp.pageIds 
}

尝试使用打字脚本查询。我也发现了这一点,它也可以工作,但如何将子菜单项链接到父页面上的内容?
temp.pageIds = HMENU 
temp.pageIds.entryLevel = 1 
temp.pageIds.1 = TMENU 
temp.pageIds.1 { 
  NO.stdWrap.field = uid 
  NO.allWrap = |, 
  NO.doNotLinkIt = 1 
} 
lib.container = CONTENT 
lib.container.table = tt_content 
lib.container.select { 
  pidInList.cObject < temp.pageIds 
}