diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php index dbd5372..2a290e3 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php @@ -55,10 +55,11 @@ class UriViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper * @param string $section The anchor to be added to the URI * @param string $format The requested format, e.g. ".html * @param boolean $ajax TRUE if the URI should be to an AJAX widget, FALSE otherwise. + * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. * @return string The rendered link * @api */ - public function render($action = NULL, $arguments = array(), $section = '', $format = '', $ajax = FALSE) { + public function render($action = NULL, $arguments = array(), $section = '', $format = '', $ajax = FALSE, $noCacheHash = FALSE) { if ($ajax === TRUE) { return $this->getAjaxUri(); } else { @@ -103,6 +104,15 @@ class UriViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper if ($this->hasArgument('addQueryStringMethod') && $this->arguments['addQueryStringMethod'] !== '') { $arguments['addQueryStringMethod'] = $this->arguments['addQueryStringMethod']; } - return $uriBuilder->reset()->setArguments(array($argumentPrefix => $arguments))->setSection($this->arguments['section'])->setAddQueryString(TRUE)->setAddQueryStringMethod($this->arguments['addQueryStringMethod'])->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix, 'cHash'))->setFormat($this->arguments['format'])->build(); + return $uriBuilder + ->reset() + ->setArguments(array($argumentPrefix => $arguments)) + ->setSection($this->arguments['section']) + ->setAddQueryString(TRUE) + ->setAddQueryStringMethod($this->arguments['addQueryStringMethod']) + ->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix, 'cHash')) + ->setFormat($this->arguments['format']) + ->setUseCacheHash(!$this->arguments['noCacheHash']) + ->build(); } }