Topic: Confused with Multiple Galleries in Magento. where to put gallery2.xml

I have successfully integrated a gallery into magento by adding the necessary files to my root directory including the gallery.xml file, and then posting the embed code on my cms page... everything is beautiful, i love it!

However, i need to add multiple galleries and i'm not sure how to do this other than like the example by adding the folders to my root for "gallery1" and "gallery2" and then going to www.mydomain.com/gallery1/index.html and having it be completely separate from my website... I still want my website's header and footer to be visible in the gallery pages...

The problem is that i can't create multiple albums on separate magento pages because in order for it to work with magento the gallery.xml has to be in the root folder... and since there both named gallery.xml i don't know what to do... I have searched all the files and can't even find where its linking to gallery.xml or i would simply change the path to look for gallery2.xml for the second album...

EDIT: i did find a reference to gallery.xml in "full.html", but i don't see how i can edit that to look in different places for the multiple gallery.xml files... any ideas?

I feel silly for even asking this, it has to be something very simple but I'd really appreciate anyone's input whether you work with magento or not probably doesn't even matter...

Thanks!  And thanks for the AWESOME gallery!!!  big_smile

Last edited by mhunkler (2011-07-22 17:11:26)

Re: Confused with Multiple Galleries in Magento. where to put gallery2.xml

You can point to a specific XML file by using the galleryURL option as a flashvar.
http://simpleviewer.net/simpleviewer/pr … .html#html
The embedding code would look something like this:

<!--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", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

i did find a reference to gallery.xml in "full.html", but i don't see how i can edit that to look in different places for the multiple gallery.xml files...

The 'full.html' file is used for Full Window mode in the Mobile Player.
There is no need to edit any files within the 'svcore' folder.

Steven Speirs
SimpleViewer Support Team.

Re: Confused with Multiple Galleries in Magento. where to put gallery2.xml

Hi, thanks so much for your help...  your code worked but i'm having a problem... I was able to choose between the two galleries by using gallery1.xml or gallery2.xml located in my root folder... But on other pages the same code is not working...

I'll like you to my page for reference.

Our main gallery landing page is here...
http://www.supervettes.com/gallery.html

as you can see the gallery is working fine on this page, and then there are two links on the top to the the individual gallery's
http://www.supervettes.com/gallery/2011 … oon-white/
http://www.supervettes.com/gallery/2005-zr6x-black/

the first link is the same gallery that is on this gallery landing page that is working ok, and has the same code as the landing page, yet, it is not showing anything... and obviously with other link it does not work either...  Something is different about the way this navigation page and CMS page is setup...

If you were familiar with magento it might make it easier to understand.  The "gallery" link  on my page is a category in my navigation, and I chose a static block for its content and used the code you gave me.  The pages for the links are regular CMS pages and use the same code. But for some reason on Magento on the CMS pages, it blocks out the javascript code with <![CDATA[ as you can see below...

<!--START SIMPLEVIEWER EMBED.-->
<script src="svcore/js/simpleviewer.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
var flashvars={};
flashvars.galleryURL="gallery2.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
// ]]></script>
<!-- END SIMPLEVIEWER EMBED -->

So i tried putting the code in an external js file and linked it like this...

<!--START SIMPLEVIEWER EMBED.-->
<script src="svcore/js/simpleviewer.js" type="text/javascript"></script>
<script src="gallery2.js" type="text/javascript"></script>
<!-- END SIMPLEVIEWER EMBED -->

it did not come up and if i check the source and click the js file, nothing would come up.. but i tried absolute values like this

<!--START SIMPLEVIEWER EMBED.-->
<script src="http://www.supervettes.com/svcore/js/simpleviewer.js" type="text/javascript"></script>
<script src="http://www.supervettes.com/gallery2.js" type="text/javascript"></script>
<!-- END SIMPLEVIEWER EMBED -->

and even in the js...

var flashvars={};
flashvars.galleryURL="http://www.supervettes.com/gallery2.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});

It would show the JS when you clicked on the link in the source but it is still not loading on the page...

I don't know what else to try...  hmm

Re: Confused with Multiple Galleries in Magento. where to put gallery2.xml

In the '2011-zr6x-balloon-white' gallery, your embedding code uses the line:

<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>

However, the 'simpleviewer.js' file does not exist at: http://www.supervettes.com/gallery/svco … eviewer.js
Try the following instead:

<script type="text/javascript" src="http://www.supervettes.com/svcore/js/simpleviewer.js"></script>

In the '2005-zr6x-black' gallery, your embedding code is trying to embed SimpleViewer into a container named 'sv-container' but there is no such container on your page.
Insert the following on your page where you would like your gallery to appear:

<div id="sv-container"></div>
Steven Speirs
SimpleViewer Support Team.

Re: Confused with Multiple Galleries in Magento. where to put gallery2.xml

EXCELLENT, THANKS!

Only thing i need to know now is where to change the css so the gallery doesn't vertically align middle and stays at the top (since i have me website header this creates unneccesary space)

I usually would use firebug to inspect the element but it don't work with this... I'll play with the CSS but if you know offhand that would be great!

Thanks Again!  big_smile  big_smile  big_smile

Re: Confused with Multiple Galleries in Magento. where to put gallery2.xml

Only thing i need to know now is where to change the css so the gallery doesn't vertically align middle and stays at the top (since i have me website header this creates unneccesary space)

Your gallery resizes dynamically with the size of the user's browser window and on a screen with a large height, the gallery will be centered (with space above and below). Instead of giving the gallery a height of 100%, try giving your gallery a fixed height specified by an absolute pixel value, eg. 600px:

simpleviewer.load("sv-container", "100%", "600", "222222", true, flashvars);
Steven Speirs
SimpleViewer Support Team.

Re: Confused with Multiple Galleries in Magento. where to put gallery2.xml

Thanks so much for all your help! Everything is working beautifully!