We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11282
    • 1 Posts
    Howdy,

    I’m working on my first project with MODx and so far it’s been great, but I’ve hit a road block which looks like it should have a pretty simple fix based on the tutorials I’ve read.

    I’m trying to simply call a chunk to an xml sheet, using Ditto. It doesn’t need to grab the date or anything, just get some XML nodes from point A to B. I’ve got a basic XML page set up and I can write valid XML through MODx manually... which kind of defeats the purpose.

    Here’s my XML sheet code as it stands:
    <?xml version="1.0" encoding="UTF-8" ?>

    [[Ditto? &parents=`49` &tpl=`test_xml_node` &displayArchive=`0` &dateSource=`editedon` &summarize=`500` &total=`500` &sortBy=`createdon`]]



    And here’s my chunk (test_xml_node):
    <item>Hello World!</item>


    When I test my page, it says "<p>No documents found</p>". I’m assuming it’s something with my tpl attribute but I still can’t get it to work. It also kind of bothers me that there’s paragraph tags around my xml. I’m running MODx Evo 1.0.2 and Ditto 2.1. Any help would be greatly appreciated.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That message has nothing to do with your chunk tpl, it’s telling you that there are no child documents under #49.

      Are you using the Rich Text editor? It will add <p> tags around anything that doesn’t have some kind of block-level tags surrounding it.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org