Hi all,
more a bit of a philosophical question :-)
While creating a new plugin to use paver.js for panoramas (based on the existing photosphere plugin) I ran into the following:
Alternative "overwrite"
The photosphere plugin "overwrites" any current picture_content.tpl from a theme by installing its own handler for 'render_element_content' with a prio higher than NEUTRAL. In it the own picture_content.tpl is used to create the output.
=> Themes with a handler with prio NEUTRAL won't get executed since the default theme checks for any previous content before executing its current picture_content.tpl.
I understand that this is done to make sure the output looks exactly like photosphere js needs it. Drawback is that anything the theme would like to add gets lost,
Alternative "extend"
I have tried a different approach with a handler with lower prio than NEUTRAL. In that I try to extend/wrap the previous content as required.
=> Themes picture_content.tpl will get executed.
Drawback: The plugin might not find what it needs to extend/wrap.
Any ideas on what might be a "better" approach and why?
Cheers,
Thomas
Offline