[TYPO3-v4] Condition for loaded extensions?

Thomas Allmer at at delusionworld.com
Thu Feb 24 00:38:17 CET 2011


On 22.02.2011 16:46, Ernesto Baschny [cron IT] wrote:
> (*) a plugin can be loaded on a page through tons of different ways, it
> doesn't need to specifically be present as a record on the current page:
> it might come from the template itself, from a "load records" content
> element which loads it from another page, or even added through PHP by
> some other extension in some other crazy fashion. You only know that
> they were included after rendering of that particular page is finished.

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)...]

If there were such a plugin-condition we could just include the js code 
where needed. So in that case it would be super useful, and I guess this 
usecase is quite common as you don't know where the plugin will be inserted.

In all other cases, like inserted with php, or with ts it should be 
clear that the condition won't work (just define it that way) and you 
have to add your js stuff some other way. So I would like to see such a 
condition and I would say it's fine if it only works for plugins 
inserted as records.

cheers
-- 
+---------------------------------+-----------------------------------+
| Thomas Allmer                   |   http://www.delusionworld.com    |
| E-mail: at at delusionworld.com    |   phone: +43 699 16217064         |
+---------------------------------+-----------------------------------+


More information about the TYPO3-project-v4 mailing list