0

I must display the news in Level 2 according to parent page news category. So for this I should extract the news category id of the parent page and pass it to the lib.var1 variable. This script works just for one item when I was in this page(item):

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
       }
   }
}
4

0 回答 0