[TYPO3-mvc] Is <f:link.action> broken when linking to translated objects
Henrik Møller Rasmussen
info at hmrdesign.dk
Sun Apr 11 11:48:44 CEST 2010
Ended up with the following view-helper (if it can help anyone else):
<?php
class Tx_HmrProducts_ViewHelpers_LanguageTextlinkViewHelper extends
Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
/**
* @param Tx_HmrProducts_Domain_Model_Product $product
* @return string
*/
public function render(Tx_HmrProducts_Domain_Model_Product $product) {
$uid =
($product->getL10nParent()>0)?$product->getL10nParent():$product->getUid();
$typolink = array(
'parameter'=>$GLOBALS['TSFE']->id,
'additionalParams'=>'&tx_hmrproducts_pi1[product]='.$uid.'&tx_hmrproducts_pi1[action]=show&tx_hmrproducts_pi1[controller]=Product',
'useCacheHash'=>1
);
return
$GLOBALS['TSFE']->cObj->typoLink($product->getNavTitle(),$typolink);
}
}
?>
-Henrik
More information about the TYPO3-project-typo3v4mvc
mailing list