[TYPO3-core] RFC: Feature Request #6882: Enable stdWrap for select.where
Martin Holtz
typo3ng_2008 at martinholtz.de
Mon Jan 26 13:11:45 CET 2009
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":
>
> Of course I could use that, but I've more than one statement there.
> Something like the following doesn't also look "clean" to me ("1=1"):
>
> select.where = 1=1
> select.andWhere = colPos={field:colPos} AND pid IN ({field:pages})
> select.andWhere.insertData = 1
well, with stdWrap on where we could just do it this way:
select.where.cObject = COA
select.where.cObject {
10 = TEXT
10.value = colPos={field:colPos}
20 = TEXT
20.value = AND pid IN ({field:pages})
stdWrap.insertData = 1
}
perhaps a little bit overhead, but the existing patch would do it.
For me its clear and easy.
>> 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:
well, i think it would be almost the same for an developer.
only the "cObject=COA" part is not needed.
>> select.where.1 = a=b
we have to set AND or OR somewhere.
>> select.where.2.data = register:colPos
>> select.where.2.wrap = colPos=|
>> select.where.2.required = 1
>> ...
>
> I like this idea and I'll create a patch for the array solution
> tomorrow. Thus, we can mark "andWhere" as deprecated.
i dont like that idea - it is not needed and it is possible to do so
with stdWrap.
i thought this patch has been integrated into core, but today i saw,
that i patched my source...
So i give my +1 by reading and testing for the patch 6882 which
introduces an stdWrap for "where" instead programming something new.
martin
--
Martin Holtz - elemente websolutions http://www.elemente.ms
DocTeam: http://forge.typo3.org/projects/show/team-docteam
http://wiki.typo3.org/Ts45min - TypoScript in "45" minutes
http://wiki.typo3.org/De:ts45min - (auch in Deutsch)
More information about the TYPO3-team-core
mailing list