Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mark Evans 86 posts 116 karma points
    Nov 04, 2014 @ 16:27
    Mark Evans
    0

    url query

    how can i get the url from a page property. the property is an external weblink which i just want to have as a link

    <a href="@subpage.GetProperty("externalRedirectUrl")">@subpage.Name</a>

    treid .Value and .Url but neither work....

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 04, 2014 @ 16:35
    Jan Skovgaard
    0

    Hi Mark

    I guess the answer depends - The code snippet above...is there anymore to it? Are you looping through something or are you assigning the model to a variable called subpage?

    Are you working with a macro or directly in the view file? If so you could perhaps use @Umbraco.Field("externalRedirectUrl")

    Looking forward to hearing from you.

    /Jan

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 04, 2014 @ 16:43
    Dennis Aaen
    0

    Hi Mark,

    What if you do it like this: What data type are you using for this type of field?

    <a href="@subpage.GetPropertyValue("externalRedirectUrl").Url">@subpage.Name</a>

    Hope this helps,

    /Dennis

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies