[TYPO3-english] Passing a value from TS to userfunc for SQL: value={field:uid}

bernd wilke t3ng at bernd-wilke.net
Tue Dec 2 16:52:11 CET 2014


Am 02.12.14 16:14, schrieb Bert Hiddink [BENDOO e-work solutions]:
> Hello Bernd,
>
> If I change....
>
>            35 = USER
>            35 {
>              userFunc = user_counter->getCounter
>              userFunc {
>                # whole string
>                selectedCategories=TEXT
> selectedCategories.data=GP:tx_news_pi1|overwriteDemand|categories
>                selectedUid=TEXT
>                selectedUid.value={field:uid}
>                selectedPid={$categoriesPid}
>              }
>            }
>
> ...for...
>            35 = USER
>            35 {
>              userFunc = user_counter->getCounter
>              userFunc {
>                # whole string
>                selectedCategories=TEXT
> selectedCategories.data=GP:tx_news_pi1|overwriteDemand|categories
>                selectedUid=TEXT
>                selectedUid.value={field:uid}
>                selectedUid.insertData=1
>                selectedPid={$categoriesPid}
>              }
>            }
>
> ...selectedUid.value prints the uid of the current page instead of the
> current category which comes from an content-object:
> ...
>       30 = CONTENT
>        30 {
>          stdWrap {
>            required = 1
>            wrap = <div class="filterinhoud filter{field:uid}">|</div>
>            insertData=1
>          }
>          table = sys_category
>          select {
>            pidInList = {$categoriesPid}
>            orderBy = sorting
>            where=deleted=0 AND hidden=0
>            andWhere.dataWrap = sys_language_uid={TSFE:sys_language_uid}
> AND parent={field:{$languageField}}
>          }
>          renderObj = COA
>          renderObj {
> ...
>
> And that is not what I want, I need the uid of the current category...

have you tried
selectedUid.field = uid
?

other approach:
try to rename the uid from sys_categories to an unique name.
30.select.selectFields = uid as CatUid,...

bernd

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


More information about the TYPO3-english mailing list