Topic: Maximum number of embedded albums on a single html page [SOLVED]
Is there a built-in limitation of the number of albums per one page?
I am unable to past 2 working albums per one page.
You are not logged in. Please login or register.
Juicebox Support Forum → Juicebox-Lite Support → Maximum number of embedded albums on a single html page [SOLVED]
Is there a built-in limitation of the number of albums per one page?
I am unable to past 2 working albums per one page.
OK, solved! 3 album works, see the scheme below. script is called once per page in the header.
<h2>album_1</h2>
<!--START JUICEBOX EMBED-->
<script>
new juicebox({
containerId: 'juicebox-container-album_1',
baseURL: 'jb/album_1/',
galleryWidth: '80%',
galleryHeight: '80%',
backgroundColor: '#222222'
});
</script>
<div id="juicebox-container-album_1" style="margin: 0 auto"></div>
<!--END JUICEBOX EMBED-->
<h2>album_2</h2>
<!--START JUICEBOX EMBED-->
<script>
new juicebox({
containerId: 'juicebox-container-album_2',
baseURL: 'jb/album_2/',
galleryWidth: '80%',
galleryHeight: '80%',
backgroundColor: '#222222'
});
</script>
<div id="juicebox-container-album_2" style="margin: 0 auto"></div>
<!--END JUICEBOX EMBED-->
<h2>album_3</h2>
<!--START JUICEBOX EMBED-->
<script>
new juicebox({
containerId: 'juicebox-container-album_3',
baseURL: 'jb/album_3/',
galleryWidth: '80%',
galleryHeight: '80%',
backgroundColor: '#222222'
});
</script>
<div id="juicebox-container-album_3" style="margin: 0 auto"></div>
<!--END JUICEBOX EMBED-->
Is there a built-in limitation of the number of albums per one page?
No, there's no limit to the number of galleries you can have on a single web page.
OK, solved!
That's great to hear! I'm glad you've been able to resolve your problem. Thank you for posting back to let me know.
For anyone who wants to embed multiple galleries on a single web page, here are a few tips.
(1) Load the 'juicebox.js' file just once per web page (rather than once per gallery).
(2) Embed each gallery into a div container with a unique containerId.
(3) In each gallery's embedding code, use a configUrl (to point towards a unique configuration file) or a baseUrl (to point towards a unique gallery folder).
Short descriptions of the configuration options in bold above can be found in the Embed Options section of the Config Options page.
Is there a built-in limitation of the number of albums per one page?
No, there's no limit to the number of galleries you can have on a single web page.
Are you certain? I'm running into problems as soon as I hit 20 embedded galleries. The final one simply won't work and opens up an earlier gallery. I've been over the coding with a toothcomb and re-done it from scratch. Same problem every time.
@mustard
Technically, there really is no limit to the number of galleries that you can have on a single web page. (There is no hard-coded limit built into Juicebox.)
The final one simply won't work and opens up an earlier gallery.
This sounds like a coding problem (maybe a duplicated baseUrl or configUrl).
Please post back with the URL to your web page so that I can see the problem for myself and hopefully help further.
Incidentally, when embedding multiple galleries, the 'juicebox.js' file should be loaded just once (i.e. once per web page rather than once per gallery). If you currently load the 'juicebox.js' file once per gallery, then leave the first instance and remove al others.
Juicebox Support Forum → Juicebox-Lite Support → Maximum number of embedded albums on a single html page [SOLVED]
Powered by PunBB, supported by Informer Technologies, Inc.