[TYPO3] Overwriting $TSFE->pSetup with USER vs. USER_INT
robin niemeyer
robin.niemeyer at gmx.net
Thu Mar 1 13:27:40 CET 2007
Hi all,
inside a frameset we have two flash navigations that need to communicate
with each other. To do this, they need some sort of id (both the same),
which should be generated once per frameset instantiation.
We came up with the following solution (see code below): First, we
generate a unique id, afterwards we initialize each frame with it by
setting the frame's 'option' parameter, finally we pass the id around by
setting config.linkVars to include our id. That's the theory. In
practice however, some (!) of us experience some problems which are
obviously cache or proxy related, i.e. they are getting the same id twice.
The problem is that for me everything works just fine, but I'm really
unsure about the way I have implemented things, so I would like to ask
you for help.
I thought the best way to solve the problem was through a USER_INT
object, but that doesn't work for reasons I don't know (but like to), so
we use a USER object instead and call $GLOBALS['TSFE']->set_no_cache()
from inside our function.
The TypoScript:
myframeset.4 = USER
myframeset.4{
userFunc = user_NavUtils->setFlashNavId
}
myframeset.frameset{
...
}
The function:
function setFlashNavId($content, $config)
{
global $TSFE;
$flashid = mt_rand();
$GLOBALS['TSFE']->set_no_cache();
$TSFE->pSetup['frameSet.']['10.']['options'] =
"flashid={$flashid}";
$TSFE->pSetup['frameSet.']['20.']['24.']['options'] =
"flashid={$flashid}";
$TSFE->pSetup['frameSet.']['20.']['26.']['options'] .=
"&flashid={$flashid}";
}
So, my question is: Does this code in all its simplicity look like it
could make any sense? And secondly: I still would like to user a
USER_INT object rather then calling set_no_cache(), but though I
actually can access $TSFE->pSetup, I could not set/overwrite its
settings - what do I need to do to achieve this?
I would appreciate your help very much, since I really have no clue.
Greetings
Robin
More information about the TYPO3-english
mailing list