简体   繁体   中英

tt_news in Menu

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).

  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 } 
  2. 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 } } } } 

Try:

pid_list >
pid_list = TEXT
pid_list.insertData = 1
pid_list.data = field : pid

instead if {data:pid} .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM