Copied to clipboard

Flag this post as spam?

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


  • Elad Lachmi 112 posts 144 karma points
    Apr 13, 2011 @ 13:12
    Elad Lachmi
    0

    Internal links in HTML

    Hi,

    I have several places on my web site where I want users to pick from the site content and put the chosen URL inside an <a> tag inside the template. Is this possible without adding xslt into the mix?

    I want something like the Content Picker datatype, but that inserts the NiceUrl instead of the node ID.

     

    Thank you!

    -Elad

  • Rich Green 2246 posts 4008 karma points
    Apr 13, 2011 @ 13:20
    Rich Green
    0

    The content picker does return the node id or are you talking about in a Rich Text Editor?

    Rich

     

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Apr 13, 2011 @ 14:30
    Tim
    0

    Are you talking about front end or back end users?

  • Elad Lachmi 112 posts 144 karma points
    Apr 13, 2011 @ 14:40
    Elad Lachmi
    0

    Sorry for the mix-up. I meant the other way around.

    I want to get the NiceUrl and not the node ID.

    I ended up installing uComponent and using the Choose URL datatype.

    Works great.

    Thank you!

  • Elad Lachmi 112 posts 144 karma points
    Apr 13, 2011 @ 15:04
    Elad Lachmi
    0

    Well... no.

    That didn't work. I get nothing from the URL Picker.

    Maybe I'm using it wrong. I created a generic property on my Document Type and in the template put:

    <a href='<umbraco:Item field="facebookLink" recursive="true" runat="server"></umbraco:Item>'>

    When I preview the page, there is nothing in the href.

     

  • Rich Green 2246 posts 4008 karma points
    Apr 13, 2011 @ 15:19
    Rich Green
    0

    What version of Umbraco are you using?

    If it's 4.7 you can do this is Razor easily, if not you can do it in an xslt macro really easy too.

    Let us know

    Rich

  • Elad Lachmi 112 posts 144 karma points
    Apr 13, 2011 @ 15:32
    Elad Lachmi
    0

    I'm using 4.5.2

    I was hoping to avoid xslt, since this is a simple link picking task.

    Isn't there a simple way to just insert a link? (a side from just using a textstring) ?

  • Elad Lachmi 112 posts 144 karma points
    Apr 17, 2011 @ 07:02
    Elad Lachmi
    0

    @Rich: How would I go about accessing the stored XML in XSLT?

    Thank you!

  • Rich Green 2246 posts 4008 karma points
    Apr 17, 2011 @ 11:30
Please Sign in or register to post replies

Write your reply to:

Draft