Search code examples
filemodx

MODX - how to listing Static Resources of certain document ID?


I'm playing with MODx 2.2. Does anyone knows how to easy listing "Static Resourses" from certain document ID? In my system there is a file attachments list below the content of article based on that "Static Resourses"


Solution

  • Not 100% sure if this is what you are trying to do. But are you trying to list the child resources of a particular partent resource? For example:

    Parent - child - child - child

    If so you will need to use the getResource snippet: http://rtfm.modx.com/display/ADDON/getResources

    and example call that you would place on the page you want to display the list would be, if the parent's ID=20

    [[getResources? &parents=`20`]]
    

    If you wish to use the current page as id to list all child resources change 20 to

    [[*id]]