[Typo3] Getting piVars from a different plugin
steven.bagshaw at unv.org
Mon Jun 20 13:39:27 CEST 2005
I have made an extension that contains 7 different plugins. Each does
something similar to the other, but they're somewhat related. Any of them
can link to others, sharing similar variables via the URL.
At the moment, I'm using pi_linkToPage() to create links between the pages
that contain the plugins. For example,
$conf = array();
$conf['CL'] = 999;
$this->pi_linkToPage($title, $pageID, '', $conf);
which produces a link like
So, here I am linking from a page with my _pi1 on it to one with _pi5.
However, it could be _pi2, _pi3 etc that was linking to the page. So, in my
_pi5 I pick up the CL value like this.
$clValue = $HTTP_GET_VARS["CL"];
This works fine. However, now I've been looking at Kasper's article on using
cHash - http://typo3.org/development/articles/the-mysteries-of-chash/ - and
I think I need to heed this.
I've managed to produce the links as he suggests by filling $this-piVars and
then using pi_linkTP_keepPIvars_url() to produce the link. It looks like
This all works fine, except when it comes to my _pi5 trying to get the CL
value, which is held under _pi1.
Is there a way for me to get this value, regardless of which plugin
variables it's stored in? Or do I need to write my own function to look
through the HTTP GET variables to find it myself?
Thanks for any help!
More information about the TYPO3-english