I'm not an expert for this, but I think it's now done using the class
IRequestFilter.
I don't know If this works also for macros or only for plugins, but I
used code like below to add a new
javascript file to the header in a recent plugin of mine. Maybe there
is also a 'add_link' function.
class MyPluginFilter(Component):
implements(IRequestFilter)
# IRequestFilter#pre_process_request
def pre_process_request(self, req, handler):
return handler
# IRequestFilter#post_process_request
def post_process_request(self, req, template, data, content_type):
add_script(req, 'myplugin/somefile.js')
return (template, data, content_type)
On Oct 26, 11:54 am, Thomas Vander Stichele <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> macros have changed a lot it seems. I have started converting the macros
> we have for 0.10 to 0.11
>
> One of them is a HeadLink macro:
>
> http://trac-hacks.org/wiki/HeadLinkMacro
>
> I've looked
> athttp://trac.edgewall.org/browser/tags/trac-0.11b2/sample-plugins/Hell...
>
> and I simply see no way to have my macro get text into the HEAD tag.
>
> Any suggestions ?
>
> Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---