[TYPO3-mvc] Fluid: link.page additionalParams and multiArray
Stefan Frömken
firma at sfroemken.de
Mon Aug 22 13:51:53 CEST 2011
Am 22.08.2011 12:44, schrieb Sebastian Kurfürst:
> Hey,
>
> yep, array keys cannot at the moment be other variables. so you cannot
> do "{{my.variable}: "value""
>
> Right now you need to write a custom ViewHelper for such juggling.
>
> Greets,
> Sebastian
Thank you Sebastian,
I've copied ViewHelper link.page and replaced content of render-function
with this one. It works now:
Stefan
$newAdditionalParams = array();
$newAdditionalParams['tx_kesearch_pi1'] = array(
'multi' => 1,
'filter' => array(
$additionalParams['filterUid'] => array(
$additionalParams['optionUid'] = $additionalParams['filterName']
)
)
);
$uriBuilder = $this->controllerContext->getUriBuilder();
$uri = $uriBuilder
->reset()
->setTargetPageUid($pageUid)
->setTargetPageType($pageType)
->setNoCache($noCache)
->setUseCacheHash(!$noCacheHash)
->setSection($section)
->setLinkAccessRestrictedPages($linkAccessRestrictedPages)
->setArguments($newAdditionalParams)
->setCreateAbsoluteUri($absolute)
->setAddQueryString($addQueryString)
->setArgumentsToBeExcludedFromQueryString($argumentsToBeExcludedFromQueryString)
->build();
$this->tag->addAttribute('href', $uri);
$this->tag->setContent($this->renderChildren());
return $this->tag->render();
More information about the TYPO3-project-typo3v4mvc
mailing list