开发者

Stop Umbraco form stealing internal links

Sometimes I want to write the entire link to a page, which can be good if in example a visitor wants to print the page or just copy the url from the web site. The thing is if I write http://www.mysite.com/licensing/terms ubmraco cuts that and removes the http://www.mysite.com, both from the link it self and from the text.

Ie

<a href="/licensig/terms">/licensig/terms</a&开发者_运维百科gt;

What i want is that it should remain as

<a href="http://www.mysite.com/licensing/terms">http://www.mysite.com/licensing/terms</a>

It does not matter if i write the link in the source editor, if i write it in the html source editor or if I use the link tool in the rich text editor.

Anyone know how to fix this?


Use umbraco.library:NiceUrlFullPath($currentPage/@id) in your XSLT to get the full domain and protocol included in your URL, or umbraco.library.NiceUrlFullPath(Node.GetCurrent().Id) in a usercontrol code-behind or binding.

HTH,

Benjamin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜