Copied to clipboard

Flag this post as spam?

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


  • Ramprasad 15 posts 116 karma points
    Aug 25, 2016 @ 14:31
    Ramprasad
    0

    How do i call a Content/Page in another Content/Page using Link picker in Umbraco?

    How do i call a Content/Page in another Content/Page using Link picker in Umbraco? And i need to call a newsample page in some x page. enter image description here

  • Casper 69 posts 305 karma points
    Aug 25, 2016 @ 16:44
    Casper
    1

    Do you want to render the pickers links to hyperlinks?

    If so then the easiest way is to install this piece of wonder:

    Umbraco Core Property Value Converters

    Then you can easily get the value of the picker as an IEnumerable<IPublishedContent> like so:

    var relatedLinks = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("relatedLinksDocTypeAlias");    
    foreach(var relatedLink in relatedLinks)
    {
        <a [email protected]" title="@relatedLink.Name">@relatedLink.Name</a>
    }
    

    //casper

  • Ramprasad 15 posts 116 karma points
    Aug 26, 2016 @ 05:20
    Ramprasad
    0

    Yeah Thanks Casper.

    Its working but how do i get an id of internal link page id using related links?

  • David Brendel 786 posts 2949 karma points c-trib
    Aug 26, 2016 @ 06:55
    David Brendel
    100

    Hi Remprasad,

    if you have the IPublishedContent you can just use it's id property.

    relatedLink.Id
    

    Then you have the id of the picked item.

    Regards David

  • Ramprasad 15 posts 116 karma points
    Aug 30, 2016 @ 10:09
    Ramprasad
    0

    Yeah it worked , thanks david

  • 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