[TYPO3-mvc] Help with PageBrowserViewHelper

Steffen Kamper info at sk-typo3.de
Mon Jul 27 00:17:52 CEST 2009


Hi,

Sebastian Gebhard schrieb:
> Hi List,
> 
> i want to write a page browser ViewHelper.
> 
> My list is a search result which is influenced by a bunch of GP-Vars.
> 
> To create the links in the pagebrowser I took a look at 
> ActionViewHelper. There I found:
> 
> $uri = $uriHelper->URIFor($pageUid, $action, $arguments, $controller, 
> $extensionName, $pluginName, $pageType, $noCache, !$noCacheHash, 
> $section, $linkAccessRestrictedPages, $additionalParams);
> 
> Of course in a pagebrowser i have to link to the same page with the same 
> parameters except an page/offset parameter.
> 
> How can I retreive all these data in the ViewHelper?
> How can I get.. (read: What is the proper way to get..)
> - the active pageUid?
at least with $GLOBALS['TSFE']->id, but see next

> - the current contoller/action (I want to use the PageBrowserViewHelper 
> for different controllers and actions)

$settings = Tx_Extbase_Dispatcher::getSettings();
this gives you the extbase action where a lot of useful informatons are 
in, make a debug!

> - the GP vars
> etc.
> 
> Or is there another (proper) way to link to the current URL with ONE 
> modified parameter?

no. piBase have some wrapper functions, you could use an own.
That's also a reason i have written a patch for the link as typolink has 
some useful options like "addQueryString", see
http://forge.typo3.org/issues/show/3981

vg Steffen


More information about the TYPO3-project-typo3v4mvc mailing list