template tags in content

9 views
Skip to first unread message

captainmish

unread,
Mar 2, 2011, 6:02:19 AM3/2/11
to django-page-cms
Hi

Has anyone figured out a way to allow content editors to use
templatetags in the actual page content? Eg {{MEDIA_URL}} or custom
templatetags. I dont want to edit the templates themselves, but allow
users to add these tags to the content as they are editing pages in
the admin.

Thanks,

faden

unread,
Mar 2, 2011, 10:25:40 AM3/2/11
to django-page-cms
The first step would be to add the parsed keyword to your template
tag:

http://packages.python.org/django-page-cms/placeholders.html#the-parsed-keyword

The what is available in the context is function of your context
processors I think. MEDIA_URL should be probably available if you have
the proper one.

For extra template-tags, try to use the {% load %}, it should work as
expected.

Captain Mish

unread,
Mar 3, 2011, 4:58:52 AM3/3/11
to django-...@googlegroups.com
Exactly what I needed, thanks!
Reply all
Reply to author
Forward
0 new messages