Topic: Placing the xml file in the right place

I'm hoping someone can put me right on this.  I've read the documentation and looked for guidance here.

I'm running a test of a pal's site here www.camarillobrillo.co.uk (click on the gallery link top right and you should see the dilemma, or part of it.

Gallery 1 here http://www.camarillobrillo.co.uk/Gallery1.htm


I have a second gallery page http://www.camarillobrillo.co.uk/Gallery2.htm

Unfortunately the content of the first gallery is coming up, not the new set of pics. 

I've "published" from Site Builder Pro into  a folder called gall 1 and gall 2 respectively. All files are sitting nicely in there.

I've pasted the code from site builder Pro into each of the pages.

Just wondering if anyone can point me in the direction as to why this is happening .  Many thanks in anticipation and a Christmas card to the person who shows me the error of my ways.  Keith

Last edited by soxer123 (2015-12-18 11:26:51)

Re: Placing the xml file in the right place

If you do not specify a galleryURL configuration option in a gallery's embedding code, then SimpleViewer will look for a file named 'gallery.xml' in the same directory as the page containing the embedding code.

As both your 'Gallery1.htm' and 'Gallery2.htm' pages are in the same directory, SimpleViewer is using the same XML file (the 'gallery.xml' file alongside the 'Gallery1.htm' and 'Gallery2.htm' pages) for both galleries.

For your Gallery #2, rename its 'gallery.xml' file to 'gallery2.xml' (but keep it in the same directory) and use the following embedding code (with a galleryURL to point towards this XML file) in your 'Gallery2.htm' page:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
    var flashvars = {};
    flashvars.galleryURL = "gallery2.xml";
    simpleviewer.ready(function () {
        simpleviewer.load("sv-container", "800", "600", "transparent", true, flashvars);
    });
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

Alternatively, you could upload your complete gallery folders (for example, 'gall1' and 'gall2') to your web server.
Each gallery's files will be self-contained in a separate folder and there will be no chance of duplicate file names causing a problem. All you then have to do is use a baseURL in your embedding code to point towards the gallery folder.
For example, if you uploaded your 'gall1' and 'gall2' folders to your root directory, then you could use the following embedding code in your 'Gallery1.htm' page:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="gall1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
    var flashvars = {};
    flashvars.baseURL = "gall1/";
    simpleviewer.ready(function () {
        simpleviewer.load("sv-container", "800", "600", "transparent", true, flashvars);
    });
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

.. and the following embedding code in your 'Gallery2.htm' page:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="gall2/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
    var flashvars = {};
    flashvars.baseURL = "gall2/";
    simpleviewer.ready(function () {
        simpleviewer.load("sv-container", "800", "600", "transparent", true, flashvars);
    });
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

For reference, short descriptions of galleryURL and baseURL are noted in the FlashVar Options section of the Config Options page and the baseURL method of embedding is documented here.

I hope this helps.

Steven Speirs
SimpleViewer Support Team

Re: Placing the xml file in the right place

Steven,

Thanks for taking the time to review and comment on my problem.  In the interim, I did actually stop it doing what it was doing, but I still have layout problems.

I'll keep soldiering on and try to solve it on my own before hassling you again.

Keith

Re: Placing the xml file in the right place

No problem.
Just let me know if you need any help.

Steven Speirs
SimpleViewer Support Team