I have a curious page structure, colPos = 0
of the subpages is used as content for its parent ... these pages have animations that need code in the parent page footer so I added the field tx_add_animation_code
in table tt_content
and this code needs to be collected.
setup.txt:
# footer script
page.footerData {
# collect subpages
5 = LOAD_REGISTER
5 {
pageIds.cObject = CONTENT
pageIds.cObject {
table = pages
select {
pidInList = this
recursive = 0
selectFields = uid
where = {#no_search}=0
}
renderObj = TEXT
renderObj {
field = uid
required = 1
wrap = |,
}
}
}
# open javascript
10 = TEXT
10.value (
<script type="text/javascript">
)
# test id collection
25 = TEXT
25 {
data = register:pageIds
noTrimWrap (
|
/* subpage Ids: | */
|
)
}
# collect animation code from CE's on subpages
20 = CONTENT
20 {
table = tt_content
select {
pidInList.data = register:pageIds
# THIS LINE BREAKS FUNCTIONALITY
where = {#colPos}=0
}
renderObj = COA
renderObj {
10 = TEXT
10.stdWrap.field = tx_add_animation_code
}
if {
value = pagets__homepage,pagets__onepage
isInList.data = TSFE:page|backend_layout
}
}
# close javascript
30 = TEXT
30.value (
</script>
)
90 = RESTORE_REGISTER
}
where = {#colPos}=0
breaks the functionality, and if I do not include it, of course, the field is collected from all the content elements ...
what is the issue ?
Please make sure that there are really some Content Elements on the Subpages having colPos=0. Please note that some extensions like gridelements or other multicol extensions will set the colPos of their childelements to something negative like -67 so they won't match the select-statement anymore.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.