Copied to clipboard

Flag this post as spam?

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


  • Sebastian Dammark 547 posts 1287 karma points
    Sep 15, 2012 @ 20:46
    Sebastian Dammark
    0

    uComponents XPath DropDownList is empty until I ...

    I've created a document property using the XPath DropDownList with the following xPath:
    $currentPage/ancestor::root/descendant::*[@id = $currentPage/parent::*/catalog]/ProductCategory

    But when I create a document with this property, the property itself is empty until I go to another page an back again.

    Any ideas ?

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Sep 15, 2012 @ 20:57
    Chriztian Steinmeier
    2

    Hi Sebastian,

    If I remember correct, you can use $parentPage to overcome this ($currentPage doesn't really exist until you save the document), e.g.:

    /root//*[@id = $parentPage/catalog]/ProductCategory

    /Chriztian

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Sep 15, 2012 @ 21:00
    Chriztian Steinmeier
    0

    And by the way, you should use as many of the DocumentType aliases you know, to get to the document containing the ProductCategory if possible, to optimize the XPath, e.g.:

    /root/Website/Catalogs/Catalog[@id = $parentPage/@id]/ProductCatalog

    /Chriztian

  • Sebastian Dammark 547 posts 1287 karma points
    Sep 15, 2012 @ 22:41
    Sebastian Dammark
    0

    Great ... thanx.  I didn't know about $parentPage :)

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Sep 16, 2012 @ 09:47
    Chriztian Steinmeier
    0

    Just to clarify:

    $parentPage is not available in standard macros - it's just for these datatypes, and I'm really not sure about which ones have it...

    /Chriztian

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Sep 16, 2012 @ 17:24
    Lee Kelleher
    0

    Just for reference, although we still support "$parentPage" parameter (in uQuery), we have better parameter called "$ancestorOrSelf", which will get the closest published node.

  • 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