Closed (fixed)
Project:
Juicebox HTML5 Responsive Image Galleries
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
11 Jan 2013 at 00:27 UTC
Updated:
7 Apr 2013 at 18:10 UTC
Jump to comment: Most recent
Comments
Comment #1
rjacobs commentedA note for myself...
It looks like there might be some ways to trigger the fullscreen mode directly via javascript no matter how the gallery is embedded. For example the following might work (though only for PRO):
A setTimeout would probably be needed to let all the Juicebox logic load first....
Without PRO, something like the following might work:
This would require a long timeout as we have to be sure that not only does the main juicebox javascript load, but also that all the viewer UI parts load first (buttons, etc.). Even with a long timeout this may not be a very stable way to do things.
There are just some thoughts, it may be that the only reliable way to do this would be with properly fullscreen-friendly markup (such as a new views display plugin).
Comment #2
rjacobs commentedOk, so the more I think about this, the more it feels like this should be handled at the theme layer, with theme overrides, independent of this module itself.
The override would need to happen to html.tpl.php, as this is the themeing level where we can "take over" all of the page output. An override of something like the following seems to work:
This will just print the suggested Juicebox full page html, and include only the main system content block content in the body (which is where the module will be rendering the juicebox embed content in standard cases).
This template file just needs to be named correctly to become active. For view-based galleries the following html.tpl.php override file name works:
html--path-to-view.tpl.php
This would also work for node/entity-based galleries, but is not very practical given that each gallery is at a separate path. For this case it makes more sense to setup content-type-specific overrides, which can be done by adding the following to template.php:
After this, the following html.tpl.php override file name should work:
html--content-type-name.tpl.php
If doing this it's important to note the following:
I just wanted to get my thoughts about this documented somewhere. Somebody who is more expert in clever themeing techniques may see a better way to do this. I suppose a downside of this is that a bunch of other templates (page, all other blocks, etc.) are still rendered by Drupal, but never used anywhere (which is not super-efficient)....
Comment #3
rjacobs commentedFor now I think it's just a matter of getting this documented.
Comment #4
rjacobs commentedI just updated the project page and the readme to reference these notes. The relevant commit is:
http://drupalcode.org/project/juicebox.git/commit/066b82a
Comment #5.0
(not verified) commentedchange some wording