Topic: Shared Assets

Hi, must each gallery be contained in it's own folder?

If so, is there an easy way to share common assets across galleries?

Re: Shared Assets

Hi, must each gallery be contained in it's own folder?

Each gallery must have a unique 'config.xml' file which stores the gallery's configuration options and image data, but there is no need to keep each gallery self-contained in an individual folder (although it can certainly help to keep things organized on your web server). You can point towards a gallery's 'config.xml' file (in any location you like) using a configUrl entry in the gallery's embedding code.

If so, is there an easy way to share common assets across galleries?

The only file within the 'jbcore' folder which may change from gallery to gallery is the 'pswd.php' file which contains the password for a gallery (if you choose to password-protect it).
Please see the Password Protection support section for details.

If you do not want to password-protect your galleries (or if you are happy to use the same password for all your galleries), then all your galleries can share a single instance of the 'jbcore' folder (rather than having an individual 'jbcore' folder for each gallery).
If you'd like to do this, then please see the Using an External jbcore Folder support section for details.

Essentially, all you need to do is upload a single 'jbcore' folder to somewhere on your web server and make sure that the 'juicebox.js file (from within the 'jbcore' folder) is loaded via a <script> tag on every web page which contains a gallery.

If all your galleries share a single instance of the 'jbcore' folder, then you can upgrade all your galleries at once (for example, when a new version of Juicebox-Pro is released) simply by swapping your single 'jbcore' folder for a new version.