[TYPO3-v4] Condition for loaded extensions?

Philipp Gampe typo3.lists at philippgampe.info
Thu Feb 24 01:21:39 CET 2011


Hi Thomas,

Thomas Allmer wrote:
> I guess it would be cool if there would be a condition just for records.
> If explicitly defined that way I think it would be ok and quite helpful.
> 
> Let's see the following usecase:
> Gallery plugin which just reads a directory and displays it pictures as
> thumbnails in a given size with a link to a bigger version. This plugin
> get's inserted by the editors them self as they see fit.
> Now I wish to use a javascript lightbox. So I have 2 solutions
> 1) load the js stuff globally and us js to see if it should do something
> or not [probably unnecessary js code on a lot of pages]
> 2) modify/extend the plugin [no updates, probably quite complex, changes
> of the js options not easily possible (extra TCA)...]

You could do this with normal TS if you make a condition if the field 
list_type of any content on current page element contains the name of your 
plugin.

But if course a conditionen like 
[pluginLoaded = indexed_search]
page.includeJS.lightbox = fileadmin/res/lightbox.js
[global]
would be much more readable

Best regards
-- 
Philipp Gampe


More information about the TYPO3-project-v4 mailing list