[TYPO3-core] RFC: Feature Request #6882: Enable stdWrap for select.where

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Dec 3 20:42:38 CET 2007


Hi,

looks easy, but we also have "andWhere", couldn't you just use that? It
works exactly like "where" with the only difference that it already does
stdWrap. Having both settings seems a bit strange to me, but I guess it
was done to make the typoscript "readable":

 select.where = a=b
 select.andWhere = c=123

So my idea would be: instead of making "where" a stdWrap, we make it an
indexed array where each element is a stdWrapped "andWhere" subpart, we
could make this a bit more flexible:

 select.where.1 = a=b
 select.where.2.data = register:colPos
 select.where.2.wrap = colPos=|
 select.where.2.required = 1
 ...

would generate "AND a=b AND colPos=0" if register:colPos is set, but
"AND a=b" if register:colPos is not set (required=1).

For backwards compatibility of course we keep "where" without an
subarray working as currently.

I cannot imagine any side-effect, maybe Dmitry could try to locate that
past thread about it? I cannot find it. :(

Cheers,
Ernesto

Oliver Hader wrote: on 03.12.2007 19:39:
> Hi Dmitry,
> 
> Dmitry Dulepov [typo3] schrieb:
>> Hi!
>>
>> Oliver Hader wrote:
>>> Problem:
>>> stdWrap is not possible for select.where.
>> Yes, this problem exists and I tried making the same patch. But I
>> remember later I found that making it stdWrap screws up something. I do
>> not remember details :( So cannot give any points to the patch. I was
>> always +1 for enabling this functionality but I do not remember why I
>> did not finish it in the end :(
> 
> I had the same feeling about that and was wondering why this easy thing
> isn't available via TypoScript. This is the reason I created a RFC
> instead of a FYI. So, it doesn't seem to be a nobrainer...
> 
> 
> olly


More information about the TYPO3-team-core mailing list