[TYPO3-mvc] link.external : how about adding 'http://' ?

Christine Gerpheide cgerpheide at gmail.com
Fri Oct 22 14:06:04 CEST 2010


2010/10/22 Franz Koch <typo3.RemoveForMessage at elements-net.de>

> Hi,
>
>
>  Currently, if the link.external viewhelper is passed "www.google.com" as
>> the
>> uri, then the link is rendered as<a href="
>> http://mytypo3site.com/www.google.com">...</a>.  Because this is an
>> external
>> link, this is obviously not correct right?
>>
>> What would you all think about appending "http://" to the link in this
>> viewhelper when there is no other protocol present?
>>
>> I realize the link-setter popup in the backend probably adds http:// for
>> you, but in my case I'm taking a value from typoscript, so no Javascript
>> helpers to add this..
>>
>
> although just a workaround, you could use the link.page viewHelper which
> passes the given string through typolink and everything should be fine again
> :)
>
> --
> kind regards,
> Franz Koch
>

Hi Franz,

This is true... But as this is an external link, that would be more
appropriate in general.  Is this, though, to imply we don't like the idea of
adding http:// in the external viewhelper?  I'm open to reasons why this
would be a bad idea, but  it seems like this could be a nice convenience.

Christine


More information about the TYPO3-project-typo3v4mvc mailing list