[TYPO3-english] accessing sys_category frompages record in typoscript [SOLVED]

bernd wilke t3ng at bernd-wilke.net
Wed Dec 3 15:35:15 CET 2014


Am 03.12.14 13:44, schrieb bernd wilke:
> I want a special kind of menu/link list:
>
> <link cat-page1>cat of page1</link> <link page1>title of page1</link>
> <link cat-page2>cat of page2</link> <link page2>title of page2</link>
> <link cat-page3>cat of page3</link> <link page3>title of page3</link>
>
> rendering the second part is easy[1],
> but how can I get the category-record of the page?
>

solution:
     30 = COA
     30 {
       10 = CONTENT
       10 {
         table = sys_category
         select {
           pidInList = 12345
           selectFields = *
           join = sys_category_record_mm
           where = sys_category.uid = sys_category_record_mm.uid_local 
AND tablenames = "pages"
           andWhere = sys_category_record_mm.uid_foreign = {field:uid}
           andWhere.insertData = 1
         }
         renderObj = TEXT
         renderObj {
           field = title
           typolink {
             parameter.field = shortcut
             ATagParams = class="relation-category-link"
           }
         }
       }
       20 = TEXT
       20 {
         field = title
         typolink {
           parameter.field = uid
           ATagParams = class="relation-link"
         }
       }
       wrap = <div>|</div>
     }


bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list