[TYPO3-english] Integrate RealUrl in my own extension
Jeppe Donslund
jd at masters.dk
Fri Apr 23 10:06:53 CEST 2010
Den 22-04-2010 15:40, Sebastian Gebhard skrev:
> For Frontend-Links you do need to "use" RealURL. Just use the TYPO3-API
> (that means typolink in case of Links). Then your Links will be rendered
> according to the TYPO3 configuration.
> No matter if simulatestatic, cooluri, realurl or none of them is used.
Okay, now I have done like this:
In the RealUrl-Configuration my PostvarSets is like this:
'postVarSets' => array (
'_DEFAULT' => array (
'0' => array (
'GETvar' => 'tx_mst_pi1[spot]',
'lookUpTable' => array (
'table' => 'tx_mst_plads',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => '1',
'useUniqueCache_conf' => array (
'strtolower' => '1',
'spaceCharacter' => '-',
),
),
),
),
),
And the links are generating like this in my Front End plugin:
$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);
But url is still like:
http://mydomain.dk/pladser/plads.html?tx_mst_pi1[spot]=2
And not
http://mydomain.dk/pladser/plads/2.html
or
http://mydomain.dk/pladser/plads/title.html
as I would like it to be.
Title should come from tx_mst_plads as defined in realurl-cinfiguration.
What do I do wrong?
Regards
Jeppe
More information about the TYPO3-english
mailing list