[TYPO3-english] Integrate RealUrl in my own extension

Jeppe Donslund jd at masters.dk
Thu Apr 22 15:21:18 CEST 2010


Den 22-04-2010 14:22, Dmitry Dulepov skrev:
> Hi!
>
> Jeppe Donslund wrote:
>>> For Frontend, use typolink:
>>> http://dmitry-dulepov.com/article/linking_properly_in_your_typo3_code.html
>>>
>>> For Backend use pagepath extension.
>>>
>>
>> If I do like this:
>>
>> $pageId = $this->pi_getFFvalue($this->cObj->data['pi_flexform'],
>> "pages"); // Single page
>> $parameters = '&tx_mst_pi1[spot]=' . $sData["uid"];
>> $pagepath = tx_pagepath_api::getPagePath($pageId, $parameters);
>
> You do it wrong :( I wrote: "For Frontend, use typolink". Instead you use
> pagepath...
>
Sorry, but with TypoLink I get the same result.

$conf = array(
   // Link to current page
   'parameter' => $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 
"pages"),
   // Set additional parameters
   'additionalParams' => '&tx_mst_pi1[spot]=' . $sData["uid"],
   // We must add cHash because we use parameters
   'useCashHash' => true,
   // We want link only
   'returnLast' => 'url',
);
$url = $this->cObj->typoLink('', $conf);

Now $url = nc/products/plads.html?tx_mst_pi1%5Bspot%5D=2

But I guess I do that wrong too. I hope really I can get into this 
RealURL. It is a very strong tool.

Jeppe


More information about the TYPO3-english mailing list