[TYPO3-mvc] extbase: build a FE uri in BE

dennis ahrens dennis.ahrens at googlemail.com
Wed Jan 20 17:07:09 CET 2010


Hi Pascal,

try to remove the $builder variable between setArguments() and
buildFrontendUri(). I think with this code you call buildFrontendUri()
not for the same object you call setArguments() on before.

I think this should work:
$uri = $builder->setRequest($request)->setCreateAbsoluteUri(true)->setArguments(array('tx_mfblog_pi1'=>array('action'
=> 'show', 'controller' => 'Post', 'post' =>
$post->getUid())))->buildFrontendUri();

regards
Dennis

2010/1/20 Pascal Geldmacher <pgeldmacher at best-mediaforge.com>:
> Hey,
>
> I've a problem to create a FE uri in BE.
> I need this link not for my own FE but for trackback.
>
> I've tried to use the Tx_Extbase_Web_Routing_UriBuilder to create the link
> but it doesn't work. it builds the baseUri but it doesn't create the
> arguments.
>
> That's the code which i've used:
> $request = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Request');
> $request->setBaseUri($_SERVER['HTTP_HOST']);
>
> $builder=t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
> $uri = $builder->setRequest($request)    ->setCreateAbsoluteUri(true)
>
> ->setArguments(array('tx_mfblog_pi1'=>array('action' => 'show', 'controller'
> => 'Post', 'post' => $post->getUid())))
> ->$builder->buildFrontendUri();
>
> Maybe i've forget something ?
>
> Thanks for help,
>
> Pascal
>
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list