Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've got a external link property in my navigation script, and stored the external url as textstring.
When it gets rendered, it renders as:
www.mydomain.com/www.google.com
instead of www.google.com
i've tried without the www, and with the http:// but nothing seems to work, it always puts the domain in front.
I know ucomponents has a type for this, but what about in standard umbraco? is this a bug?
Thanks, Pete
Can we see the navigation script and even the live page?...i've seen this happen when there is no "http://" but you say you have tried it with this?
S
Sorry no live page.
Here's the outputed html
<li><a href="www.google.com">/ An Example Link</a></li>
This is how the browser processes it:
Here's my nav code:
<ul class="drop-down"> @foreach (var item in Model.Children.Where("Visible")) { var hrefer = @item.Url; if(item.NodeTypeAlias == "externalLink"){ hrefer = @item.linkUrl.Url; } <li><a href="@hrefer">/ @item.Name</a></li> } </ul>
#Confused!
If you build the string like:
hrefer = "http://" + @item2.linkUrl.Url;
It works, but not if you put "http://www.google.com" into the textstring field.
I'm probably being stupid here but you have two options
@item.linkUrl
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
External Link Url Bug 4.9+
I've got a external link property in my navigation script, and stored the external url as textstring.
When it gets rendered, it renders as:
www.mydomain.com/www.google.com
instead of www.google.com
i've tried without the www, and with the http:// but nothing seems to work, it always puts the domain in front.
I know ucomponents has a type for this, but what about in standard umbraco? is this a bug?
Thanks, Pete
Can we see the navigation script and even the live page?...i've seen this happen when there is no "http://" but you say you have tried it with this?
S
Sorry no live page.
Here's the outputed html
<li><a href="www.google.com">/ An Example Link</a></li>
This is how the browser processes it:
www.mydomain.com/www.google.com
Here's my nav code:
#Confused!
If you build the string like:
hrefer = "http://" + @item2.linkUrl.Url;
It works, but not if you put "http://www.google.com" into the textstring field.
I'm probably being stupid here but you have two options
@item.linkUrl
is working on a reply...