简体   繁体   English

菜单中的tt_news

[英]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). 它应该在第2层的所有子页面中显示其父页面(第1层)的最新新闻(我使用tt_news,并为第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). 这是我的源代码,它由两部分组成,它在所有level2菜单中仅显示第一个父页面(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} . 相反,如果{data:pid}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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