在TYPO3中获取页面子元素的内容

4
我正在使用Mac OS上的Typo3.6.4。
我想从一个子页面获取内容。 该内容位于第三个子页面中,并需在具有TypoScript的“Page”中显示:
Page -SubPage 1
-SubPage 2
-SubPage 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
    }  
  }
2个回答

0

也许你已经通过 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">

不是因为我的Typoscript的其余部分不起作用,而是我无法获取子页面的内容。 - Lynxi

0

我喜欢回答自己的问题 <3

所以,问题出现在“css_styled_content”项目上,第一个项目我没有使用它,但是在第二个项目中,我使用了这个项目,但它不起作用。

所以,如果你想像我一样写作,你需要停用该项目或者不断搜索 :D


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接