[TYPO3] How to loop in TS?

Dmitry Dulepov [typo3] dmitry at typo3.org
Tue Apr 8 12:33:18 CEST 2008


Hi!

Mattias Borell wrote:
> Maybe I did? When reading the TSref I got the impression that those two 
> where the same (both listing UID for pages) but that pidInList had 
> stdWrap abilities. Or does pidInList mean Parent page UID? (Am I the 
> only one that finds TSref confusing...? :-)

uidInList uses uid field to select records using the numbers you supplied. pisInList uses pid field for the same. Normally, when you use CONTENT with tables other than "pages", you would use pidInList and give page uid there. But when you want to select from "pages" table, you have a choice: if you use pidInList, you select pages, whose parent is in the list, while uidInList will select pages, whose id values you give in list.

For example:

> Reduced page-structure:
> 15
>  |-88
>  | |-90
>  | |-89
>  |-87
>  |-86

uidInList=90,89,87 will select pages with uid 90 or 89 or 87. pidInList=90,89,87 will select no pages because neither of these pages has subpages. But pidInList=88 will give you pages with uid 90 or 89.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"


More information about the TYPO3-english mailing list