0

我的页面上有一些“插入记录”,内容分别来自左列、主列和右列。我想让它们用 float:left 连续显示,具体取决于来自的列。每个“插入记录”内容都应该是一个带边框的块(CSS 的东西在这里无关紧要)。

直到现在我有这个:

lib.contentpageheader = CONTENT
lib.contentpageheader {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos=3
    select.languageField = sys_language_uid
    renderObj=COA
    renderObj {
        stdWrap.wrap = <div class="separated_block"> | <div class="clearingDiv"></div></div>
        10=CONTENT
        10 {
            table=tt_content
            select.where=colPos=1
            select.orderBy=sorting
            ... something missing ...
            renderObj.stdWrap.wrap = <div class="separated_block_left"> | </div>
        }
        20=CONTENT
        20 {
            table=tt_content
            select.where=colPos=0
            select.orderBy=sorting
            ... something missing ...
            renderObj.stdWrap.wrap = <div class="separated_block_middle"> | </div>
        }
        30=CONTENT
        30 {
            table=tt_content
            select.where=colPos=2
            select.orderBy=sorting
            ... something missing ...
            renderObj.stdWrap.wrap = <div class="separated_block_right"> | </div>
        }
    }
}

如何设置对正确“插入记录”记录的引用,以便我只获取属于相应“插入记录”记录的内容?现在,我正在获取页面上存在的所有记录,而忽略了定义的“插入记录”内容。

大概是这样的?

select.andWhere.current = 1

select.andWhere.wrap = uid=|
4

2 回答 2

0

我是这样理解的:

lib.contentpageheader = CONTENT
lib.contentpageheader {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos=3
    select.languageField = sys_language_uid
    renderObj=COA
    renderObj {
        stdWrap.wrap = <div class="separated_block"> | <div class="clearingDiv"></div></div>
        1=RECORDS
        1 {
            source.field = records
            tables = tt_content
            conf.tt_content.stdWrap.innerWrap.cObject=CASE
            conf.tt_content.stdWrap.innerWrap.cObject {
                key.field=colPos
                0=TEXT
                0.value = <div class="separated_block_middle"> | </div>
                1=TEXT
                1.value = <div class="separated_block_left"> | </div>
                2=TEXT
                2.value = <div class="separated_block_right"> | </div>
            }

        }
    }
}
于 2013-08-14T14:31:56.783 回答
0

这效果更好:

lib.contentpageheader = CONTENT
lib.contentpageheader {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos=3
    select.languageField = sys_language_uid
    renderObj=COA
    renderObj {
        stdWrap.wrap = <div class="separated_block"> | <div class="clearingDiv"></div></div>
        1=RECORDS
        1 {
            source.field = records
            tables = tt_content
            conf.tt_content.stdWrap.if {
                equals.field=colPos
                value=1
            }
            wrap = <div class="separated_block_left"> | </div>
        }
        2=RECORDS
        2 {
            source.field = records
            tables = tt_content
            conf.tt_content.stdWrap.if {
                equals.field=colPos
                value=0
            }
            wrap = <div class="separated_block_middle"> | </div>
        }
        3=RECORDS
        3 {
            source.field = records
            tables = tt_content
            conf.tt_content.stdWrap.if {
                equals.field=colPos
                value=2
            }
            wrap = <div class="separated_block_right"> | </div>
        }
    }
}

这样,内容按其所属的列分组。正是我需要的:)

于 2013-08-15T14:52:38.107 回答