How to redirect page to the link from Multi URL picker
@{
var link = Model.Value("link");
if (link != null)
{
}
}
I tried using this but, instead of automatically redirects the page to the link, there is another page with the link from the multi url picker. Help is very much appreciated
Do you want to redirect or do you want the link to be opened ?
I think you will not see the link on your page anyway because you have no text in it. You could change the code to this to have the text of the link displayed
@{
var link = Model.Value<Link>("link");
if (link != null)
{
<li><a href="@link.Url" target="@link.Target">@link.Name</a></li>
}
}
How to redirect page to the link from Multi URL picker
@{ var link = Model.Value("link"); if (link != null) {
I tried using this but, instead of automatically redirects the page to the link, there is another page with the link from the multi url picker. Help is very much appreciated
Anyone?
Hi,
Do you want to redirect or do you want the link to be opened ?
I think you will not see the link on your page anyway because you have no text in it. You could change the code to this to have the text of the link displayed
Dave
Hi Dave, I would like the link to be opened, as of now, the pageonly shows a the link from my multi url picker
When do you want this to be opened ?
Dave
When user clicks the page that has picker in it
Hi,
In that case you should have a look at this : https://our.umbraco.com/Documentation/Reference/Routing/routing-properties#umbracoredirect
You can add a field with alias umbracoRedirect to your doctype that uses a content picker as property editor.
Than the redirect will happen automagically.
Dave
Hi Dave,
I tried this, but, I realized that its only allow redirects to nodes. What I'm trying to accomplish is to go to external links, for example, google
Hi,
Than you could do this :
is working on a reply...