https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43230

David Cook <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from David Cook <[email protected]> ---
I've been thinking lately about how it would be good to have a hook or hooks
that let us inject content into a variety of places rather than just one or two
specific places (like the intranet authorities detail toolbar).

Imagine a Template::Toolkit plugin like
"Koha::Template::Plugin::ExtraContent::intranet('authorities_detail_toolbar',other_args)"

Then within that Template::Toolkit plugin you'd have all the logic with
Koha::Plugins->new()->GetPlugins(). 

I suppose we probably would need a database table registry for the keys like
'authorities_detail_toolbar' to make it performant. That is, the Koha plugin
registers what "keys" it provides at install time, and then when Koha renders
the templates it looks for any plugins that have those keys. 

I've just been thinking that way we only have to add 1 plugin hook and we can
rapidly add Koha::Template::Plugin::ExtraContent::intranet() and
Koha::Template::Plugin::ExtraContent::opac() into other templates.

I've still got more thinking to do though...

And my idea is very Template::Toolkit heavy and doesn't take into account the
move to Vue.js for more of the front-end, although that could work similarly
too. 


Extra reading:

Bug 30289 - Use Template::Toolkit WRAPPER to reduce template boilerplate
Bug 42534 - wrapper-staff-tool-plugin.inc interferes with js and includes in
template files
#For Bug 42534 I have a patch that allows plugins to push "js chunks" (but it
could be anything) to the intranet-bottom.inc via the
wrapper-staff-tool-plugin.inc

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to