Copied to clipboard

Flag this post as spam?

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


  • Frost 70 posts 99 karma points
    Nov 29, 2011 @ 00:07
    Frost
    0

    rootXpath difficulties

    This package is great! I got it working once I removed the rootXpath parameter ... I'm not really sure how to write that correctly or what the @ refers to, and couldn't find a guide. Can anyone point me in the right direction?

    The example in the Document Sorter package is

    rootXpath="//newsIndex[@isDoc]

    How do I edit that to reflect my content tree?

    Thanks,

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 01, 2011 @ 23:10
    Tom Fulton
    100

    Hi,

    To be honest I've never had to use this, but from the looks of it, it's just a level of validation on the parent document to determine if sorting should happen or not.

    For example, maybe you want to sort Textpages under the Services page, but not anywhere else on your site.  You could use the rootXpath option to limit the sorting to only happen on the services page.

    To do this you could use the below, assuming Services is the alias of your doctype.

    <add docTypeAlias="Textpage" field="nodeName" type="Alpha" order="Asc" rootXpath="//Services [@isDoc]" />  

    Next time a textpage is saved, Document Sorter will check it's parent document against the rootXpath condition, which is just checking if the DocTypeAlias.  If it doesn't match no sorting will happen.

    Hope this helps,
    Tom

  • Frost 70 posts 99 karma points
    Jan 14, 2012 @ 01:31
    Frost
    0

    Thanks Tom! That helps me understand it better ... I was thinking about it as a folder system and filepath rather than simply aliases.

    For anyone else with similar questions, I was digging around with fresh eyes and found a couple good references:

Please Sign in or register to post replies

Write your reply to:

Draft