1 (edited by chgloe 2010-07-20 16:56:18)

Topic: Split gallery.xml - settings in separate file

When having several galleries, my experience is that it somewhat cumbersome to keep all galleries updated with the settings when something is to be changed.

Are there any possibilities to specify settings in a different .xml and link to this file for all galleries, leaving gallery.xml for the images only?

If not, I would appreciate seeing it implemented.



Re: Split gallery.xml - settings in separate file


thanks for the suggestion. We may implement something like this in future. How are you creating your galleries? Have you tried creating and using Presets in svBuilder?

Felix Turner
SimpleViewer Support Team.

3 (edited by chgloe 2010-07-20 16:51:15)

Re: Split gallery.xml - settings in separate file

Initially I created the gallery through Lightroom. I have also purchased svManager and using this when updates to the galleries are needed.

By the way, I am still using the "source-code version" of SimpleViewer (altough I also purchased 2.0), due to some nice (well, in my view) functions that was added and that is not yet supported in the latest version. This require some boring "meddling" with the .xml file(s) when I feel it's time for adjustments.

Re: Split gallery.xml - settings in separate file

PLEASE add this as a function?  please?

It would be amazing to be able to separate the code tweaks from the content in the gallery files..  much like calling an external css file, from within html..

I have lots of galleries on different pages, but all using the same formatting.. 
When i change something...  i have to go through every single folder and page and do it manually, instead of having just one simple file that all the galleries can call back to for formatting....

thank you in advance!!

Re: Split gallery.xml - settings in separate file


This functionality already exists as the presetURL option, a description of which can be found here: http://simpleviewer.net/simpleviewer/pr … .html#html
More information on using 'Presets' can be found here: http://simpleviewer.net/simpleviewer/pr … ml#presets

In order to point a gallery towards a presetURL, you would use embedding code such as the following:

<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
<div id="sv-container"></div>

The above example would format the gallery using the layout options found in 'preset.xml' but would display the images listed in 'gallery.xml'.
(Please note that if your XML file is named 'gallery.xml' and is located in the same directory as the HTML file into which the gallery is embedded, then the line flashvars.galleryURL="gallery.xml"; is not required. It is included above for the sake of completeness.)

Steven Speirs
SimpleViewer Support Team