I've been looking for the way to convert the typo3 internal urls whose format is t3://page?uid=xx
to a human readable url http://mydomain/page-slug
.
I'd want to do the same thing that the ViewHelper link.typolink
does but in the php context (outside of the Extbase context, I'm not in a controller). The context is that I am gettind a link from a db to send it to an external API. I tried to look for documentation but all helpers are about generating an url from controller name and action, etc...
Can somebody please explain what is the proper way to do it? The typo3 version I use is the 11.5.
Thanks for your answers.
Actually a content was needed but I had no clue which value to set in it and... I found it, in the cObject, there is the method
That takes the same parameter as
stdWrap_typolink
, calls thetypolink
method as well but with the $content variable already set which in this case is a pipe|
.So you only need to call it so:
And you have your url.
Thank you for your help Julian.