Currently a gadget can't modify HTTP headers / meta tags if its not added in the layout or is being executed (index.php?gadget=Foobar).
So what comes to my mind is to add a new feature: autoload actions. But what does the *autoload action* is going to do?
Well, when Jaws gets requested it will check on /gadgets/autoload_items, (which will have a list of gadgets that have the 'autoload' key/thingie turned on), then it will call the 'autoload' action of each gadget.
An example could be a 'sitemap' and a new version of the 'visitcounter':
- Jaws gets requested
- Will check on /gadgets/autoload_items and will find that we have 'Sitemap,VisitCounter?'
- Then it will call the autoload action of Sitemap and VisitCounter?
- Sitemap will modify the HTTP and metatags
- VisitCounter? will increment (for example) its visits counter.
- Done
Maybe this could sound like adding 'autohook' actions to the gadgets, if that's the name we will give to this new feature I'm OK with it ;-)
And as well, keep this ticket updated with your ideas/suggestions/comments and the changes you make to the core that affect this ticket.