Skip to content

Instantly share code, notes, and snippets.

@muex
Created March 15, 2024 12:46
Show Gist options
  • Save muex/4aab59e34eed57e01215c0312de063e1 to your computer and use it in GitHub Desktop.
Save muex/4aab59e34eed57e01215c0312de063e1 to your computer and use it in GitHub Desktop.
lib.dynamicContent = COA
lib.dynamicContent {
10 = CONTENT
10 {
table = pages
select.orderBy = sorting
select.where = doktype != 199
as = pageId
renderObj = COA
renderObj {
10 = CONTENT
10 {
table = tt_content
select {
pidInList.field = uid
orderBy = sorting
where = colPos = 0
}
}
20 = CONTENT
20 {
table = sys_category
select {
pidInList.field = root,-1
selectFields = sys_category.uid, sys_category.title
join = sys_category_record_mm ON sys_category.uid = sys_category_record_mm.uid_local
where.data = field:uid
where.intval = 1
where.wrap = sys_category_record_mm.uid_foreign=|
}
renderObj = COA
renderObj {
10 = TEXT
10.field = title
10.wrap = |
10.wrap.override = <span class="category">|</span>
}
stdWrap {
wrap = <div class="categories">|</div>
}
}
stdWrap {
if.isLessThan.field = doktype
if.value = 3
wrap = <section id="p{field:uid}" data-display="{field:sys_category.title}">|</section>
wrap.insertData = 1
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment