Copied to clipboard

Flag this post as spam?

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


  • Martin Vingaard 39 posts 60 karma points
    Oct 17, 2011 @ 10:30
    Martin Vingaard
    1

    Accessing parent Content Picker value

    Im trying to get the value of a text string from a page assigned at parent content picker of the current page.

    <xsl:variable name="contactNode" select="$currentPage/parent::*[@isDoc]/listingContact" />
              E-Mail<xsl:value-of select ="umbraco.library:GetXmlNodeById($contactNode)/employeeEmail" />

    I've tried doing it like so. But it dosnt seem that the variable contains the node.

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Oct 17, 2011 @ 10:33
    Lee Kelleher
    0

    Hi Martin,

    Try dumping out the values, see what's there?

    <xsl:value-of select="$currentPage/parent::*[@isDoc]/listingContact" />

    or

    <xsl:value-of select="$contactNode" />

    ... and then ...

    <xmp><xsl:copy-of select="umbraco.library:GetXmlNodeById($contactNode)" /></xmp>

    Cheers, Lee.

  • Martin Vingaard 39 posts 60 karma points
    Oct 18, 2011 @ 08:52
    Martin Vingaard
    0

    ContactNode returns the ID and the GetXmlNodeById posts all the data of the wished node.
    Now im just strugeling with getting the  employeeEmail

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Oct 18, 2011 @ 08:59
    Dirk De Grave
    0

    Martin,

    Can you copy'n'paste your output from the last copy-of statement? From what i'm reading, I think 

    <xsl:value-of select="umbraco.library:GetXmlNodeById($contactNode)/employeeEmail" />

    should be enough to get the field

     

    Cheers,

    /Dirk

  • Martin Vingaard 39 posts 60 karma points
    Oct 18, 2011 @ 09:25
    Martin Vingaard
    0

    Yeh i would so so too Dirk... But for some reason it dosnt work.
    I'm starting to get fustrated :)
    Been Googleing and using our.umbraco to find a solution. There must be a human error somewhere. 

    The code:

    <xsl:variable name="contactNode" select="$currentPage/parent::*[@isDoc]/listingContact" />

    Works

    <xsl:value-of select="$contactNode" />

    Does write the correct Id

    <xsl:value-of select="umbraco.library:GetXmlNodeById($contactNode)/employeeEmail" />

    Nothing...

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Oct 18, 2011 @ 09:27
    Dirk De Grave
    0

    Martin,

    so what is the output of

    <xmp><xsl:value-ofselect="umbraco.library:GetXmlNodeById($contactNode)"/></xmp>

    as Lee already pointed out?

     

    Cheers,

    /Dirk

  • Martin Vingaard 39 posts 60 karma points
    Oct 18, 2011 @ 09:28
    Martin Vingaard
    0

    It returned the Id: 1472

    Fixed it... Deleted the "employEmail" and created it again... Guess there was some internal error somewhere.

    FYI: recrated the property.

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Oct 18, 2011 @ 10:22
    Lee Kelleher
    0

    Out of curiousity, what was the property actually called, "employeeEmail" or "employEmail"?

  • Martin Vingaard 39 posts 60 karma points
    Oct 18, 2011 @ 11:44
    Martin Vingaard
    0

    It was employeeEmail

  • 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