Copied to clipboard

Flag this post as spam?

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


  • merves 23 posts 43 karma points
    Dec 27, 2012 @ 00:09
    merves
    0

    how to get Member profile info with GetCurrentMember()

    Hi, 

    I have try to retrieve member info in my text box. (an ecommerce site, while ordering i want to get member info automatically)

    and i have use fallowing code,  but it returns noting, 

    <div class="informationFieldWrap firstName">
                  <label for="firstName">
                    <span class="required">*</span>
                 
                   <xsl:value-of select="umbraco.library:GetDictionaryItem('FirstName')" />
                  </label>
                  
                  <!--Merves-->
                  <input type="text" id="firstName" name="firstName" value="{umbraco.library:GetCurrentMember()/@firstName}" />
                </div>

     

    by the way, when try to get @nodeName it works fine. ia there anybody has an idea?

    thanks in advance

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 27, 2012 @ 00:39
    Jan Skovgaard
    0

    Hi Merves

    As I posted in another post you should try and see what the content of the $member variable is :)

    You do this by writing

    <textarea>
    <xsl:copy-of select="$member" />
    </textarea>

    What does the XML returned look like? Can you post it in here?

    /Jan

  • merves 23 posts 43 karma points
    Dec 27, 2012 @ 08:13
    merves
    0

    thanks for your quick reply :)

    i have tried and it gives;

    <node id="1270" version="b3929657-8a4c-4d6e-a25d-317a3200691c" parentID="-1" level="1" writerID="0" nodeType="1226" template="0" sortOrder="95" createDate="2012-12-09T11:55:45" updateDate="2012-12-09T11:55:45" nodeName="merve" urlName="merve" writerName="Admin" nodeTypeAlias="SiteMembers" path="-1,1270" loginName="merve" email="m"><firstName>Merve </firstName><lastName>mysurname</lastName><address>my address</address><city>kazablanka</city><phone>1234567</phone></node>

    am i missing sth on the previous code?

  • merves 23 posts 43 karma points
    Dec 27, 2012 @ 08:58
    merves
    0

    by the way i have tried value={$member/@firstName}   

    it didnt worked as well

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Dec 27, 2012 @ 09:18
    Peter Dijksterhuis
    0

    You should try $member/firstName

    firstName is not an attribute, but it is a childnode of $member, the @ is used to get attributes (like loginName)

    Peter

  • merves 23 posts 43 karma points
    Dec 27, 2012 @ 11:41
    merves
    0

    Thanks!!

    one little @ costs me hours! :)

Please Sign in or register to post replies

Write your reply to:

Draft