Topic: config.xml on root folder but needs multiple gallery [SOLVED]

From what I understand you have to have separate config files for each gallery. If I am putting config.xml on the root folder, how do I put another config file?
I have two separate galleries with their own config files.

Re: config.xml on root folder but needs multiple gallery [SOLVED]

You can rename (or relocate) a gallery's XML file and point towards it using the configUrl option in the embedding code.

For example, you could have 2 galleries. The 1st gallery's XML file could be named 'config1.xml' and the 2nd gallery's XML file could be named 'config2.xml'.
The embedding code for the galleries might look something like this:

<script src="jbcore/juicebox.js"></script>

<script>
    new juicebox({
        containerId: "juicebox-container-1",
        configUrl: "config1.xml",
        galleryWidth: "800",
        galleryHeight: "600",
        backgroundColor: "#222222"
    });
</script>
<div id="juicebox-container-1"></div>

<script>
    new juicebox({
        containerId: "juicebox-container-2",
        configUrl: "config2.xml",
        galleryWidth: "800",
        galleryHeight: "600",
        backgroundColor: "#222222"
    });
</script>
<div id="juicebox-container-2"></div>

Please note that when embedding multiple galleries into a single HTML page, you should load the 'juicebox.js' file only once per page (rather than once per gallery).
Also, be sure to embed each gallery into a unique container (a <div> with a unique 'id').

Please see the Embedding Multiple Galleries support section for online examples.

Alternatively, instead of saving all your gallery XML files in the same directory, you could keep all your galleries separate in their individual folders, upload the complete folders (not just the contents) to your web server and embed the galleries using the baseUrl method as documented here.

Short descriptions for the configUrl and baseUrl configuration options can be found here.

Re: config.xml on root folder but needs multiple gallery [SOLVED]

Thank you. That's very helpful. I was able to encapsulate config file for each gallery in their own separate folder. This keeps it well organized.

Re: config.xml on root folder but needs multiple gallery [SOLVED]

You're welcome!