[Typo3-dev] Extension-Dev: control output via typoscript

Kraft Bernhard kraftb at mokka.at
Mon Jan 10 19:13:00 CET 2005


Hallo Ingo,

I have solutions for both of your ideas ... which one you choose is up to you

Ingo Schommer wrote:

> my ideas:
> - configuration via typoscript-parameter (obviously not a good idea as 
> they are both on the same page and would inherit the parameter, right?)

you could do something like

plugins.tx_myplugin_pi1.typovariable = 1
temp.firstplugin < plugins.tx_myplugin_pi1

plugins.tx_myplugin_pi1.typovariable = 2
temp.secondplugin < plugins.tx_myplugin_pi1

so the variable will be 1 during the rendering of "firstplugin" and 2
during rendering of "secondplugin"


> - doing another "pi2"-extension, but that would tear apart my code

you could create a pi2 extension, move all shared code to a new
class.tx_myplugin_shared.php and create a class which contains the shared
code inside ...

this will allow you to write two fe extension where each one uses a shared
codebase ... but this will still tear your code apart a "little bit" ...


greets,
Bernhard




More information about the TYPO3-dev mailing list