[TYPO3] How to get TS config of content element in extension?
Dmitry Dulepov [typo3]
dmitry at typo3.org
Wed Aug 20 08:38:53 CEST 2008
Hi!
Jigal van Hemert wrote:
> To make a long story short:
>
> - A content element "X" of pi1/tx_myext_pi1.php is present on a page
> - Another content element "Y" on the same page needs to ask code in
> tx_myext.php information about the first content element
> - the code in tx_myext.php knows which content element is "X" and even
> knows all info from tt_content for "X".
> - the code in tx_myext.php needs to know the TS configuration of "X".
> How can it find this??
>
> Hope someone has any pointers to where I can get this info...
$GLOBALS['TSFE']->tmpl->setup['plugin.]['tx_myext_pi1.] is an array with configuration for plugin tx_myext_pi1. For example, if you have this TS:
plugin.tx_myext_pi1 = USER
plugin.tx_myext_pi1 {
userFunc = whatever
a {
b = c
}
}
You will have in setup:
array(
'plugin.' => array(
'tx_myext_pi1' => 'USER',
'tx_myext_pi1.' => array(
'userFunc' => 'whatever',
'a.' => array(
'b' => 'c'
)
)
)
)
There is one "but" though. If plugin uses flexform configuration, this configuration may override TS settings.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/should_abbreviations_be_used_in_the_code/
More information about the TYPO3-english
mailing list