Adding to the <head> part

nicroets

Joined: 2005-11-07
Posts: 28
Posted: Fri, 2005-11-11 20:12

I'm developing a mapping module that determines the location from which each photo was taken, called 'gps'. One feature is to embed that location as a machine readable tag into each page. The (draft) standard(s) need that tag to be inside the <head> part of the document.

Now I was able to modify the <head> part of any gallery2 document from inside the module by defining my own templateAdapter class and replacing the system wide template adapter. But I fear that doing it this way may not be compatible with future versions of gallery and / or other modules that also need to modify the tag.

Can the 'core' team please include a mini API for doing this in the next major release of gallery ?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-11 20:29

copy'n'paste from another topic:

adding stuff to <head>:
- if it's for a View, then call $template->head('modules/moduleName/templates/Header.tpl'); in your loadTemplate function
- if it's for a block, call $template->head(...) in your Preload.inc class

can't you do it in your view / block ?

 
nicroets

Joined: 2005-11-07
Posts: 28
Posted: Sat, 2005-11-12 13:47

This way is much better. Thanks !