Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Cu3er and XML

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1228 Views
  • Vladas
    Avatar
    Community Member
    17 Posts

    Cu3er and XML Link to this post

    I'm going to use Cu3er, which is a image slideshow on my website. It's going to have simple transitions between images so my XML config file will be pretty simple. Right now, I store all the images and configuration information in DataObject and edit it through ImageDataObjectManager. I want it to save it all to the XML file that is accessed by flash object on a site, so every single time I press Save and Publish, a file would be updated.

    I know one way to do: in HomePage.php(that's where my cu3er flash object is held) write a function onAfterWrite() and there take all the data from database field and through standard php functions save it to the XML file

    $xmlfile = fopen($currTheme . "/cu3er/config.xml", "w");
          fwrite($xmlfile, $finalresult);
          fclose($xmlfile);

    Is this is a good way or could you recommend me a better way please?

    1228 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.