[TYPO3-english] getting $GLOBALS['TSFE']->tmpl->setup[plugin.][myext] in eID

Richard Davies richard at ocular.co.nz
Wed Dec 21 21:32:41 CET 2011


Hi,

t3lib_div::_GP('id')

will fetch the get/post variable called 'id' you sent. I have a
version of the code you mentioned in a few extensions, I just write
out the page ID in JS, something like

$content .= '<script> var pageId = ' . $GLOBALS['TSFE']->id

when creating the page, and when I do an AJAX fetch I add that
variable to the fetch, in your case something like.

...&id='+pageId;

Richard

On 22 December 2011 09:10, EricTibo <eric.thibault at dc.ulaval.ca> wrote:
>
> I have a problem with the solution!
> I am not able to list the configuration of my plugin... (setup inside my
> page template)
>
> plugin.tx_tacticrepoeuvres_pi1 {
>        CMD =
>        pidList = 23014
>        recursive = true
>        gabarit = fileadmin/gabarit/oeuvres_template.html
>        css = fileadmin/gabarit/styles.css
> }
>
> And in my eid script I have
>
> function main() {
>
>     $this->initTSFE(); //cut and past from Xavier Perseguers's post
>
>     $conf =
> $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_tacticrepoeuvres_pi1.'];
>
>     $content = print_r($conf, true);
>
>     print($content);
> }
>
> All that the function main() returns is:
>
> [includeLibs] =>
> typo3conf/ext/tactic_repoeuvres/pi1/class.tx_tacticrepoeuvres_pi1.php
> [userFunc] => tx_tacticrepoeuvres_pi1->main
>
> It seams that this code "t3lib_div::_GP('id') inside the initTSFE()
> function" is not able to get the page id! if I replace this code by the real
> page ID number, everything works great....
>
> How can I make this work?
>
> Thanks a million times!
> --
> View this message in context: http://old.nabble.com/getting-%24GLOBALS-%27TSFE%27--%3Etmpl-%3Esetup-plugin.--myext--in-eID-tp32852571p33019156.html
> Sent from the TYPO3 English mailing list archive at Nabble.com.
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list