TYPO3显示包含CSS类的子页面的内容 [英] TYPO3 show content from subpages inlcuding css classes

查看:68
本文介绍了TYPO3显示包含CSS类的子页面的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下打字稿,我可以从一页子页面中获得所有内容:

With the following typoscript I get all content from the subpages on one page:

lib.allPid = COA
lib.allPid {
  10 = HMENU
  10 {        
    special = directory
    special.value = 2
    1 = TMENU
    1 {
      expAll = 1
      NO.doNotShowLink = 1
      NO.allStdWrap.field = uid
      NO.allStdWrap.wrap = |,
    }
    2 < .1
  }
}

lib.allContent = CONTENT
lib.allContent {
  table = tt_content
  select {
    pidInList.cObject < lib.allPid
    leftjoin = pages ON (tt_content.pid = pages.uid)
                where = tt_content.colPos = 0                    
                orderBy = pages.sorting ASC
  }
}

但是它没有复制内容元素中的布局选择框定义的tt_content包装:

But its not copying the tt_content wrap defined by the layout selectbox in the content element:

tt_content.stdWrap.innerWrap.cObject.default.20.40 = CASE
tt_content.stdWrap.innerWrap.cObject.default.20.40 {
    key.field = layout

    1 = TEXT
    1.value = tag-1

    2 = TEXT
    2.value = tag-2

    3 = TEXT
    3.value = tag-3

    4 = TEXT
    4.value = tag-4

    5 = TEXT
    5.value = tag-5

    6 = TEXT
    6.value = tag-6

    7 = TEXT
    7.value = tag-7
}

我试图像这样将包裹添加到lib.allContent元素,但是没有用:

I tried to add the wrap to the lib.allContent element like this, but it didn't work:

lib.allContent.stdWrap.innerWrap.cObject.default.20.40 = CASE
lib.allContent.stdWrap.innerWrap.cObject.default.20.40 {
    key.field = layout

    1 = TEXT
    1.value = tag-1

    2 = TEXT
    2.value = tag-2

    3 = TEXT
    3.value = tag-3

    4 = TEXT
    4.value = tag-4

    5 = TEXT
    5.value = tag-5

    6 = TEXT
    6.value = tag-6

    7 = TEXT
    7.value = tag-7
}

有人知道该怎么做吗?预先感谢!

Does anybody know how to do this? Thanks in advance!

我找到了没有打字错误的解决方案(或更优:解决方法).我用新内容元素-特殊元素-插入记录"手动地一个接一个地插入子页面中的内容.然后,所有内容都被复制.此解决方案需要更多的用户输入,但完全可以满足我的需求.

I found a solution (or better: workaround) without typoscript. I insert the contents from the subpages with "New content element - Special Elements - Insert Record" manually one by one. Then, everything is copied. This solutions requires a little more user input but fits perfectly to my needs.

推荐答案

尝试 vhs ViewHelper 它将为您提供确切的输出,您想要的是我的意思是默认换行以及所有.

give a try to vhs ViewHelper it'll give you exact output what you want I mean default wrap and at all.

{namespace v=FluidTYPO3\Vhs\ViewHelpers}

<v:page.menu pageUid="2" includeSpacers="0" resolveExclude="1">
    <f:for each="{menu}" as="contentList" iteration="Iteration">
        <div id="uid{contentList.uid}" class="inner-page-content-of-pageUid-2">
            <v:content.render column="0" pageUid="{contentList.uid}" />
        </div>
    </f:for>
</v:page.menu>

有关 vhs ViewHelper

这篇关于TYPO3显示包含CSS类的子页面的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆