But where do I put the custom template, than? If I load it from an app template, I must create it under <app>/templatetags/, and what if I want to call it from the base template? <project_root>/templatetags/?
Thanks! Diogo On Jul 2, 9:23 pm, Jonathan Buchanan <jonathan.bucha...@gmail.com> wrote: > On Thu, Jul 2, 2009 at 10:55 PM, diogobaeder<diogobae...@gmail.com> wrote: > > > Hi there, > > > Is there a way to create a custom tag that can be used in different > > applications at the same time, so that I could make the call on the > > "base.html" template? The custom tag, here, is a blog subjects menu, > > which I > > want to use in all the pages (all the apps) of the website, in the > > frontend. > > > I know that I must create a "templatetags" subdirectory, to act as a > > module, inside the apps, if I want to create a template tag for that > > app, > > but what if I want to make it visible to all apps and callable from a > > base > > template? > > > Thanks! > > If it only needs to be called in the base template, you could just {% > load %} and call it there as normal. > > If it really does need to be available globally: > > http://www.djangosnippets.org/snippets/160/ > > Regards, > Jonathan. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---