Topic: Embed config.xml data into page?

I'd like to dynamically create the config file data for the CMS I'm using and pass some variables to create it, but I'd like to do this without storing the config file locally.  Is it possible to generate the file data into the html file that the gallery is embedded in rather than access the external file?

Thanks!

Re: Embed config.xml data into page?

If it helps anyone else...

I found earlier that you can use .php files instead of .xml, but didn't realize that POST and GET functions would work on this also.  From the page I can pass that information and it generates automatically.

Hope that saves someone down the road.

Re: Embed config.xml data into page?

To answer your initial question:

Is it possible to generate the file data into the html file that the gallery is embedded in rather than access the external file?

You can set the options in the embedding code such as:

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
    new juicebox({
        containerId : 'juicebox-container',
        screenMode : 'LARGE',
        stagePadding : '100'
    });
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

... but you will still need to list the images in an XML (or PHP) file.

Re: Embed config.xml data into page?

I would like to know if this is possible also, so I can implement it into my CMS.  I see that I can specify another config file w/ a js parameter:

configUrl: 'config2.xml'

but I'd like to put the content from the config.xml file within the html page containing the embed code.

  <image imageURL="images/IMG_4543.JPG"
    thumbURL="images/IMG_4543.JPG"
    linkURL="images/IMG_4543.JPG"
    linkTarget="_blank"
    sourcePath="C:\Users\...\Pictures\Ath...\IMG_4543.JPG">
    <title><![CDATA[IMG_4543]]></title>
    <caption><![CDATA[]]></caption>
  </image>

This will probably be a deal breaker, if I can't do this. 

thanks,

Re: Embed config.xml data into page?

@Jinglebals

I'd like to put the content from the config.xml file within the html page containing the embed code

This is not possible. You can set the configuration options in the gallery's embedding code (as documented here) but the image data needs to be stored in a separate file (whether it is a static XML file of a file generated dynamically by a server-side scripting language such as PHP).
The only other option would be to use Flickr as a source of images for your gallery. You could then set the Flickr options in the embedding code and there would be no need for any image data to be stored in an external file.
Juicebox would still need to find an XML file to function correctly but you could just use an empty XML file containing just the <juiceboxgallery /> tag.