我必须根据父母页面新闻类别在第2级显示新闻。因此,我应该提取父页面的新闻类别ID并将其传递给lib.var1
变量。当我在此页面(项目)时,此脚本仅适用于一个项目:
lib.var1 < plugin.tt_news
lib.var1 {
code >
code = LATEST
templateFile= fileadmin/news_template.tmpl
categorySelection = {field:uid}
categorySelection.insertData = 1
pid_list >
pid_list = 19
catImageMode = 1
catTextMode = 0
latestLimit = 1
}
### secondary Level ###
2 = TMENU
2 {
noBlur = 1
stdWrap.wrap = <ul style=""><li> | </li></ul>
stdWrap.innerWrap = <div><ul>|</ul></div>
stdWrap.preCObject = COA
stdWrap.preCObject {
10 = CONTENT
10 {
table = tt_news_cat
select.selectFields = tt_news_cat.uid
select.where.dataWrap = tt_news_cat.pid = {field:pid}
select.max = 1
renderObj = COA
renderObj {
#Test the render is OK
10 = TEXT
10.value = {field:uid}
10.insertData = 1
20 =< lib.var1
}
}
}
NO = 1
NO {
linkWrap= <li class="">|</li>
ATagTitle.field = title
}
}
}