我会通过typoscript将CSS类添加到菜单项中。它应该作为一个类,页面的类别。我怎么能这样做?
MAIN_NAV.1.NO = 1
MAIN_NAV.1.NO {
linkWrap = <h4>|</h4>
wrapItemAndSub = <li class="section **{field:sys_categories.title}**">|</li>||<li class="section">|</li>||<li class="section">|</li>||<li class="section">|</li>
wrapItemAndSub.insertData = 1
}
答案 0 :(得分:0)
我在CONTENT Object中添加了一个类别标题/ String。
NO {
wrapItemAndSub.override.cObject = COA
wrapItemAndSub.override.cObject {
if {
isTrue.field = categories
}
5 = TEXT
5.value = <div class="item
10 = CONTENT
10 {
table = pages
select {
pidInList.field = pid
uidInList.field = uid
join = sys_category_record_mm ON pages.uid = sys_category_record_mm.uid_foreign JOIN sys_category ON sys_category.uid = sys_category_record_mm.uid_local
where = 1
orderBy = sys_category.sorting
}
renderObj = TEXT
renderObj {
field = title
}
}
5000 = TEXT
5000.value = ">|</div>
}
}