[TYPO3-dev] ext_typoscript_setup.txt

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Jul 26 10:33:17 CEST 2006


Elmar Hinz schrieb am 25.07.2006 22:01:

>> I try to relocate the "core hack". If everything works like usual this
>> means IMHO that you can't replace css_styled_content with another rendering
>> setup like you imagine, because it would have the wrong id. All extensions
>> work.  But they only work with css_styled_content or "content (default)",
>> but with nothing else.

> Hier it is:
> 
> <http://svn.t3.digitaldistrict.de/cgi-bin/trac.cgi/browser/typo3/TYPO3core/trunk/t3lib/class.t3lib_extmgm.php?rev=4768>
> 
> Line: 872 - 874

> 872 if ($afterStaticUid==43)    {    // If 'content (default)' is targeted,
> also add to other 'content rendering templates', eg. css_styled_content
> 873
> $TYPO3_CONF_VARS['FE']['defaultTypoScript_'.$type.'.']['cssstyledcontent/static/'].=$content;
> 874 }

True, I have overlooked that. That is really ugly. We want to get rid of
"static templates" (sys_templates) in a "near future", so this would
make no sense at all.

> The function is short and easy to XCLASS.
> 
> To get rid of the XCASS a little change would be nice. Just replace
> 'cssstyledcontent/static/' with a global variable and you really can use
> any rendering setup.
> 
> $TYPO3_CONF_VARS['FE']['defaultTypoScript_'.$type.'.']['cssstyledcontent/static/'].=$content;
> 
> $TYPO3_CONF_VARS['FE']['defaultTypoScript_'.$type.'.'][$SomeGlobalVariabel].=$content;

While this might be useful, I think we agree that there are no other
"content renderers" except "content (default)" and CSC. So these are
handled when you call addTypoScript with the last parameter being "43".

I will now list the situations where kickstarter is generating these. We
"just" need some replacement for them. I think they all could be
"banned" directly to a static template (included on demand). The user
using either css_styled_content or content (default) will have to add
the static template for the FE-plugin anyway, so there doesn't need to
be this hacked dependency in the source code.

1) When adding a FE-plugin (list_type):

	t3lib_extMgm::addTypoScript(\$_EXTKEY,'editorcfg','
                        tt_content.CSS_editor.ch.".$cN." = <
plugin.".$cN.".CSS_editor
                    ',43);

I have never used the CSS_editor, so I am not sure how useful this is.
The CSS-editor "seems" very powerful, but that's probably something most
people don't even know that it exists. Or am I wrong? This is the single
most used "addTypoScript" snippet that almost all extensions that
contain a FE-plugin and have its roots in the kickstarter will have.

2) When adding a FE-plugin to handle certain TypoTags:

	t3lib_extMgm::addTypoScript(\$_EXTKEY,'setup','
		tt_content.text.20.parseFunc.tags.".$tagName." = <
plugin.'.t3lib_extMgm::getCN(\$_EXTKEY).'_pi".$k."
                        ',43);

Personally I've never used a TypoTag. But might be useful anyway. And I
am not even sure if this is the best place to put this function in, as
this will work only in the elements of type "Text" and "Text with
images". A more generic place would be "lib.parseFunc_RTE", which is
used almost everywhere to parse tags.

3) This is always added if you have checked a table in the "list by
default as an example" option:

	t3lib_extMgm::addTypoScript($_EXTKEY,\'setup\',\'
tt_content.shortcut.20.0.conf.'.$tableName.' = <
plugin.\'.t3lib_extMgm::getCN($_EXTKEY).\'_pi'.$k.'
tt_content.shortcut.20.0.conf.'.$tableName.'.CMD = singleView
                            \',43);

Adding a possibility to use the "Insert Records" content element to add
the singleView of an user choosable record. This is the second most
common addTypoScript that you will encounter in extensions.

4) Adds to "Textbox Content Element"

                    t3lib_extMgm::addTypoScript($_EXTKEY,\'setup\',\'
                        plugin.'.$cN.'_pi'.$k.'.IMAGEcObject {
                          file.width=100
                        }
                    \',43);

I've never used it and never saw it being used.




Cheers,
Ernesto




More information about the TYPO3-dev mailing list