Copied to clipboard

Flag this post as spam?

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


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 16, 2011 @ 15:47
    Bjarne Fyrstenborg
    0

    Get member name

    Hi..

    I was wondering if it's possible to get a member name, with inline xslt to show the username/member name when a user is logged in?

    Or do I have create a xslt-file or usercontrol to get that?

    Bjarne

  • Frederik T 242 posts 373 karma points
    Aug 16, 2011 @ 15:52
    Frederik T
    3

    Dont know if it will work but try something like this:

    <xsl:value-of select="umbraco.library:GetCurrentMember()/@nodeName"/>
  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 16, 2011 @ 16:00
    Bjarne Fyrstenborg
    0

    Yes.. it's something like that in a xslt file, but I was thinking about to get a member name without creating a macro + xslt/usercontrol..

    like you e.g. can get an image with inline xslt.
    When it just is the member name I need, I would like if it was possible to do that with just inline xslt..
    but if it isn't possible, I will create a xslt file for that.

    Bjarne 

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 16, 2011 @ 18:11
    Bjarne Fyrstenborg
    0

    But thanks for your suggestion..

    It works with that line in a xslt-file..

    If somebody has other suggestions, you are welcome to share it.

    Bjarne 

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Aug 16, 2011 @ 18:20
    Tom Fulton
    2

    Hi Bjarne,

    I suppose you could use this function in Inline XSLT also.  You'd have to pass it a "dummy" field that will always exist, like pageID, to make it render

    <umbraco:Item field="pageID" runat="server" Xslt="umbraco.library:GetCurrentMember()/@nodeName"></umbraco:Item>

    -Tom

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 16, 2011 @ 18:28
    Bjarne Fyrstenborg
    0

    Hi Tom..

    Thanks.. it works..
    I didn't know that you just can use another field, like the pageID in this case..

    Well, then I also have learned something new today..

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft