This might be a bit too specific for this forum, but I'm not sure where a better place would be to post this.

I'm trying to get Juicebox to display a gallery on my page, which is does. If I display it in the content type, it shows up fine, complete with all the captions and everything. If I display it in a block view, and specifically say that I want it to display the captions, the gallery shows up, but doesn't display them.

In the Content Type editor, I'm able to change Juicebox settings in Manage Display:
https://www.dropbox.com/s/6wxct0ttyx20frs/JB-ManageDisplay.PNG?dl=0

In the Views Editor, I'm able to use Configure Field to edit the settings:
https://www.dropbox.com/s/e9e6wo5upp8dw64/JB-ConfigureFields.PNG?dl=0

It works in the Content Type but not in the View. Why? How can I fix this? The HTML doesn't even show up, so I know the captions aren't coming through.

Here's a rough draft of my page in action:
goo.gl/BbvDYu

As you can see, the RED gallery is from my view and does not have captions. My BLACK gallery is from my content type and does have captions.

Thanks,
Brendan

Comments

fkelly12054@gmail.com’s picture

I can't quite figure out what you are doing with the manage display and the Views Editor. I have dozens of Juicebox Galleries displayed on my web site. I have a "special" content type called juicebox gallery. The "guts" of it are in the body field of the content type and your code will look something like this:

<!--START JUICEBOX EMBED--><script src="/drupal8/sites/all/libraries/juicebox/juicebox.js"></script><script>
    new juicebox({
        baseUrl : '/drupal8/sites/default/files/gays_galleries/sentinels',
        containerId: 'juicebox-container',
        galleryWidth: '100%',
        galleryHeight: '100%',
        backgroundColor: '#222222'
    });
    </script>
<div id="juicebox-container">&nbsp;</div>

You need to use the Juicebox Builder from Juicebox.net (separate from the Drupal module) to build the Gallery. With the correct settings there the captions will be embedded in the xml file that controls the Juicebox gallery display on your web site. I use a URL path setting for each instance of this content type (i.e., each gallery) and link to that in the base url tag in the code (example above).

For my wife's page on my web site (the full web site is fkelly.org, the home page has many galleries, the Sculpt and Print tab has a set of Galleries that are presented from a view) I added a couple of fields to the content type such as the order of the album and a representative image field as well as a field I called bla bla bla for the album descriptions. In any case, if the album is built properly with juicebox builder and the captions are in the right place in the xml file, the javascript program will display them.

By the way, rjacobs who authored the excellent Drupal module, is also helpful over in the issue queue side of this site.