Avoid using the root

Jun 20, 2008 at 11:58 AM
Hi, i have managed to get slide.show working, was a very easy installation. However i do not want to have the config and data file in the root and want all the files associated with the slideshow in a SlideShow folder. What do i have to do to get this to work? as i can not work it out.
Jun 20, 2008 at 6:14 PM
Edited Jun 20, 2008 at 6:19 PM

There are 3 files involved: the page with the slide show on it, config.xml and data.xml. You need to link them in that order. You can put the files wherever you like: the QuickStart Guide is quite rightly just trying to make it easy for newbies like us. Hope this helps.
  1. In the slide show page (in the <DIV>):


    script type="text/javascript"> 
    new SlideShow.Control(new SlideShow.XmlConfigProvider ({url: "path/to/config.xml"}));

    (for example: MySlideShow/config.xml... presuming the page is not going to be in the same folder as the xml files, which I would advise against; just url: "config.xml" if you want EVERYTHING in the same folder).  




  2. In config.xml (after the <transitions>):


    <dataProvider type="XmlDataProvider"
    option name="url" value="path/to/data.xml" />


    (As the config.xml and data.xml files will be in the same folder, this will be value="data.xml").