Reputation: 3
In need to create a special and complicated menu. It should display in the Level 2 all sub-page with the latest news of their parent page (level 1) (I used tt_news and I created news for each page level 1). Here is my source code, it is composed of two parts, it shows in all level2 menu juste only the news of the first parent page(level 1).
The first part:
lib.var1 < plugin.tt_news
lib.var1 {
code >
code = LATEST
templateFile= fileadmin/news_template.tmpl
categoryMode = 0
pid_list >
pid_list.insertData = 1
pid_list = {data:pid}
catImageMode = 1
catTextMode = 0
latestLimit = 1
}
The second part:
lib.field_menu= HMENU
lib.field_menu {
entryLevel = 0
### first level ###
1 = TMENU
1 {
noBlur = 1
expAll = 1
wrap = |
NO = 1
NO {
allWrap = |
ATagTitle.field = title
}
}
### secondary Level ###
2 = TMENU
2 {
noBlur = 1
stdWrap.wrap = <ul style=""><li> | </li></ul>
stdWrap.innerWrap = <div><ul>|</ul></div>
stdWrap.innerWrap2.preCObject =< lib.var1
NO = 1
NO {
linkWrap= <li class="">|</li>
ATagTitle.field = title
}
}
}
}
Upvotes: 0
Views: 668
Reputation: 660
Try:
pid_list >
pid_list = TEXT
pid_list.insertData = 1
pid_list.data = field : pid
instead if {data:pid}
.
Upvotes: 1