[TYPO3-dev] Multidimensional URL-Parameters
David Bruchmann
typo3-dev at bruchmann-web.de
Mon Aug 23 14:07:38 CEST 2010
----- Ursprüngliche Nachricht -----
Von: Bernhard Kraft <kraftb at think-open.at>
Gesendet: Montag, 23. August 2010 13:49:01
An: typo3-dev at lists.typo3.org
CC:
Betreff: Re: [TYPO3-dev] Multidimensional URL-Parameters
> Am 2010-08-20 13:15, schrieb David Bruchmann:
>
>> If you know about an extension or have programmed one with those
>> requirements I'd like to know how the URL-parts are structured and
>> perhaps how building and interpreting is realized.
>> Technically I'm interested in solutions for pi_base (cms), MVC (extbase)
>> and other frameworks.
>
> In the most cases when I need to generate an URL/link I use the
> $this->cObj->typoLink(...) method. The typoLink method is the method of
> class.tslib_content.php which also gets used to generate every link
> found inside an RTE or any link you set via the "Link" fields for
> headlines, images, etc.
>
> This "typoLink" function is very powerful. You can configure it from
> within TypoScript, and only set the appropriate parameters from within
> your extension. It is almost impossible to formulate everything you can
> do with it. Here just an example.
>
> Create a TypoScript:
>
> plugin.tx_myext_pi1.myLink {
> parameter = 123
> additionalParams.dataWrap =
> &tx_myext[cobj_1][page]={GP:tx_myext|cobj_1|page}&tx_myext[cobj_2][page]={register:browserPage}
>
> returnLast = url
> useCacheHash = 1
> }
>
> This configuration links to page 123 with the parameters set in
> "additionalParams". One of the browser-parameters is taken from the GET
> vars and the other one from a register.
>
> In your extension/php code you can then gerate a link by using:
>
> $link = $this->cObj->typoLink('', $this->conf['myLink.']);
>
> Of course you can do a lot more with the "->typoLink" function/method.
> Just look up the features in the TSref:
>
> http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.2/view/1/5/#id2507605
>
Hi Berhard,
thanks for the explanation!
I think I can adapt something from it to my own viewHelper in Fluid.
What do you think about a CGL for links?
Greets,
David
More information about the TYPO3-dev
mailing list