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

    I am really new to Modx and am finding I am getting lost really fast.

    I have a flash page that reads xml files to display information on the page. I do this so the sites owner can update a specific page without my aid and I would like if he could do it through Modx as I think it looks like a great system to use.

    I need to make a template he can access that will allow him to input a date, location and a link. My xml currently looks like this....

    <broadcast>
    <story>
    <lead>06.28.07</lead>
    <body>The Underground York University</body>
    <URL>http://www.theundeground.com/</URL>
    </story>
    </broadcast>

    Is there any template out there that can allow him to put the info in dynamic text boxes and the page will output in xml format like the example above?

    Sorry for the complex question I searched all the documentation and forums and came up dry.

    Thanks for the help everyone,

    -- Nate
      • 22098
      • 218 Posts
      simply make a template with the XML you want, add Template Variables for date, location and URL, and read these TV’s into the XML template on the appropriate spots. That’s it!

      Olaf
        • 20992
        • 11 Posts
        If anyone has any suggestions that might be a little more detailed or any links to pages that can help that would be great because I am lost more now than before.

        I don’t even know where the pages are being saved or how to save them.

        -- Nathan
          • 3781
          • 24 Posts
          I too am really new (ie. an hour) to MODx, and all I really want to do is the same as nate51 - create an XML template with TVs - create documents/items using the template - aggregate the documents so that the Flash application need only access one XML location

          I had a look into Ditto, but seems a bit over my head - especially for a seemingly straight forward issue (so i thought hehe). Is there a more basic solution to my goal?
            • 36624
            • 535 Posts
            there is a little example :

            1) document template
            <?xml version="1.0" encoding="UTF-8" ?>
            <myXml>
                     [!Ditto? &tpl=`DittoXML` &startID=`2` &summarize=`200`!] // 2 is where docs are located - change it!
            </myXml>
            


            3) chunk for ditto (name is"DittoXML")
            <story>
            <date>[+tvDate+]</date>
            <title>[+pagetitle+]</title> 
            <url>[+tvUrl+]</url>
            </story>
            


            when you are done Create a new document, set the template, set the alias to "source.xml" and set the doc type to : text/xml.

            with a web browser you can then preview your url /source.xml to check the output and also load it with flash.


            you can find more inspiration for ditto here http://wiki.modxcms.com/index.php/Basic_Blog
            and for xml i suggest you read this one http://wiki.modxcms.com/index.php/SiteMap:_Google_sitemaps_in_MODx


              CTRL+SHIFT+U - Clear Cache
              CTRL+SHIFT+H - Hiding Heft Panel
              CTRL+SHIFT+N - Fast Create Resource
              CTRL+ALT+P - Preview Recource (in edit resorce window)
              CTRL+ALT+S - Save