On Thu, Jul 2, 2009 at 10:55 PM, diogobaeder<[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to