[TYPO3-core] RFC #10011: New feature: TypoScript Condition to check for installed extensions

Dmitry Dulepov dmitry at typo3.org
Wed Dec 24 12:30:22 CET 2008


Hi!

Franz Holzinger wrote:
> Problem:
> Sometimes you must have a different TypoScript if an extension has been
> installed. And you want to write a common TypoScript usable for a lot of
> websites. You need a condition to check if an extension has been installed.
> 
> Solution:
> Enhance the TypoScript conditions by 'ext'.

I'd prefer "extension".

> Syntax:
> [ext = extension1,extension2, ...]

When I saw comma in your patch description, I automatically assumed that condition should return true if all extensions in the list are installed. But the patch shows that if a single extension in the list is installed, condition returns true. Confusing.

Also this is not how other conditions work. They typically have only one value to check. If you want "or" for conditions, you would do:

[glovalVar = TSFE:id = 5] || [glovalVar = TSFE:id = 6]

So extension condition could be:

[extension = realurl] || [extension = cooluri]

This will (1) simplify the patch, (2) avoid the confusion and (3) make it look like other conditions.

What do you think?

The patch is attached.

-- 
Dmitry Dulepov
TYPO3 core team
In the blog: http://typo3bloke.net/post-details/how_will_i_fix_bugs_in_extensions_from_now_on/
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matchcondition_v2.diff
Type: text/x-diff
Size: 396 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081224/a9b37bbc/attachment.diff 


More information about the TYPO3-team-core mailing list