[TYPO3-english] Trying to understand the "select" property better
Jigal van Hemert
jigal at xs4all.nl
Tue Oct 18 17:49:28 CEST 2011
Hi,
On 18-10-2011 16:11, Ernesto Domato wrote:
>> lib.test_content = CONTENT
>> lib.test_content.table = pages
>> lib.test_content.select.where = title LIKE 'Prod%'
>> lib.test_content.renderObj = TEXT
>> lib.test_content.renderObj.field = title
>>
> Ok, I didn't see that if you don't place a value on the "pidInList"
> property, then the uid of the actual page is used and that brakes the
> query. Is there a way that I can make the "select" ignore the
> "pidInList" property?.
TSRef states that the default value for pidInList is 'this'.
The next property of select it describes is 'recursive':
"Recursive levels for the pidInList", default: 0
So, theoretically you could use
select {
pidInList = 1 #the root pid of your site
recursive = 999
...
}
This would however cause the core to build a list of *all* pids below
the root pid and add that to the query. (something like:
SELECT ..... WHERE ..... AND pid IN (1,3,2,15,16,17,23,....,231,513)
This is not something to recommend.
Be smart with the select and figure out where the data is located, and
if necessary use a small recursive number.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
More information about the TYPO3-english
mailing list