Typo3:Layout Onepager 存在不同的子页面和后端布局

问题描述

我有一个 Typo3 网站,我将所有子页面放在 Onepager 上,代码如下:

lib.content = COA
lib.content {

    ### Content from Homepage
    10 = CONTENT
    10 {
        table = tt_content
        select {
            pidInList.data = site.rootPageId
            orderBy = sorting
            where.cObject = COA
            where.cObject {
                10 = TEXT
                10 {
                    field = colPos
                    intval = 1
                    ifEmpty = 0
                    noTrimWrap = | AND colPos=||
                }
            }
        }
    }

    ### Contents from subpages
    20 = CONTENT
    20 {
        table = pages
        select.orderBy = sorting
        select.where = doktype != 199

        renderObj = COA
        renderObj {
            10 = CONTENT
            10 {
                table = tt_content
                select {
                    pidInList.field = uid
                    orderBy = sorting
                    where = colPos = 0
                    }    
                }
            
            stdWrap {
            if.isLessthan.field = doktype
            if.value = 3
            wrap = <section id="p{field:uid}">|</section>
            wrap.insertData = 1
            }

            20 < .10
            20.select.where = colPos = 1
            20.wrap = <div class="portfolio-col1">|</div>

            30 < .10
            30.select.where = colPos = 2
            30.wrap = <div class="portfolio-col2">|</div>

            40 < .10
            40.select.where = colPos = 3
            40.wrap = <div class="portfolio-col3">|</div>

            50 < .10
            50.select.where = colPos = 4
            50.wrap = <div class="panorama">|</div>

            60 < .10
            60.select.where = colPos = 5
            60.wrap = <div class="presse-col1">|</div>

            70 < .10
            70.select.where = colPos = 6
            70.wrap = <div class="presse-col2">|</div>
        }
    }
}

我的模板 Default.html 中的代码是:

<html data-namespace-typo3-fluid="true" xmlns:f="https://xsd.helhum.io/ns/typo3/cms-fluid/master/ViewHelpers">
    <!-- Nutzen des Layouts "Page/Default" -->
    <f:layout name="Page/Default"/>

    <!-- Rendern des Hauptinhalt -->
    <f:section name="Main">
        <f:cObject typoscriptObjectPath="lib.content" />
    </f:section>
</html>

现在我的问题是我不能再将布局用于 Portfolio 和 Presse。 例如,投资组合布局如下所示:

   <main>
        <div class="portfolio">
            <div class="portfolio-col1">
                <f:render section="Portfolio1"/>
            </div>
            <div class="portfolio-col2">
                <f:render section="Portfolio2"/>
            </div>
            <div class="portfolio-col3">
               <f:render section="Portfolio3"/>
            </div>
        </div>
        <div class="panorama">
            <f:render section="Panorama"/>
        </div>
    </main>

这就是为什么我试图在 lib.content 下包装不同的 colpos,但它为每个 uid 呈现所有 div。 enter image description here

我怎样才能仍然布置不同的部分?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...