Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    Jun 15, 2015 @ 12:50
    Biagio Paruolo
    0

    Full URL of item. How?

    Hi,

    How to have a full URL of an item? I use

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Jun 15, 2015 @ 13:03
    Dennis Aaen
    1

    Hi Biagio,

    Have you tried using the NiceUrlWithDomain(int id) method.

    Like this:

    <a href="@Umbraco.NiceUrlWithDomain(1234)">My link</a>
    

    You can find the documentation here https://our.umbraco.org/documentation/Implementation/Query-Data/UmbracoHelper

    Hope thus helps,

    /Dennis

  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    Jun 16, 2015 @ 09:24
    Biagio Paruolo
    0

    And for an item like image as item.GetCropUrl?

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Jun 16, 2015 @ 09:58
    Dennis Aaen
    1

    Hi Biagio,

    Perhaps you could solve this by using the following:

    <img src='@Umbraco.NiceUrlWithDomain(CurrentPage.Id).GetCropUrl("image", "banner")' />
    

    Else I think this will work for you

    @{ 
         var domain = "http://" + HttpContext.Current.Request.Url.Host;
    
        <img src='@[email protected]("image", "banner")' />
    }
    

    Hope one of the two suggestions can be a solution for you.

    /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