Copied to clipboard

Flag this post as spam?

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


  • Sagar 74 posts 275 karma points
    May 23, 2016 @ 13:43
    Sagar
    0

    MultiUrl Picker

    Link to document is not changing as per the uploaded pdf enter image description here

    enter image description here

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    May 24, 2016 @ 12:44
    Alex Skrypnyk
    0

    Hi Sagar,

    What exactly do you mean? What link should change?

    CHeers

  • Sagar 74 posts 275 karma points
    May 25, 2016 @ 05:30
    Sagar
    0

    My Menu link should be the pdf's link (it should redirect to the pdf)

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    May 25, 2016 @ 10:59
    Alex Skrypnyk
    0

    Hi Sagar,

    You need to get Url from media object. Do you store media id in the picker? Try this code:

    var pdfLink = Umbraco.TypedMedia(id).Url;
    

    Cheers, Alex

  • Sagar 74 posts 275 karma points
    May 25, 2016 @ 12:50
    Sagar
    0

    Hi Alex i was using Multi Url Picker and I had Solved it By Myself

    Thanxx, For the Reply Alex....

  • Sagar 74 posts 275 karma points
    May 25, 2016 @ 12:53
    Sagar
    101

    Here is the Code for the Menu Item (Redirect to PDf L:ink using Multi Url Picker)

                if (children.HasValue("pDFLink")) //pdflink is my allias name of multi url picker
            {
                MultiUrls links = children.GetPropertyValue<MultiUrls>("pDFLink");
                Link linkProperty = links.FirstOrDefault();
                if (linkProperty != null)
                {
                    <li><a class="@linkProperty.Name" href="@linkProperty.Url">@children.Name</a></li>
                    <br />
                }
                else
                {
                    <li><a class="@children.Name" href="#">@children.Name</a></li>
                }
            }
    
  • 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