If you don't want to set the section variable in your template context
you can also do something similar by just defining a new block to
contain your section id. Something like this:
[...]
etc...
--~--~-~--~~~---~--~~
You received this message because you are
Got it working, i was using some flatpage but since only
flatpage.content or flatpage.title is possible if i wanted to define
, since the flatpage template extend my base.html it
would haev been anoying create som {{ block body }} and rewrite
everything in the flatpage. so i deleted the
Sorry, my mistake. Actually you can't insert anything into the context
in urls.py. I was thinking of the ability to pass extra arguments for
your view functions, which is of little use here.
So I'd either use the method I illustrated above or go with the CSS
method. Either way, you need to
Method 1
-
the current page (or section) in the
context. You can do it in your urls.py
url.py : r'recette/$', 'cefinban.recettes.views.index',{'section':
'index'}),
-> result in
Exception Type: TypeError
Exception Value:create_recette() got an unexpected keyword
Giving each menu item an id : OK
"and in each section of the site, assign a class to
the body tag based on the section you're in."
i cant't do that i use a template which follow this way :
---
[...]
{% include "header" %}
{%
thanks ! thats cool
--~--~-~--~~~---~--~~
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 [EMAIL
A simple solution is to indicate the current page (or section) in the
context. You can do it in your urls.py (see
http://www.djangoproject.com/documentation/url_dispatch/#passing-extra-options-to-view-functions
) or in views.py.
Let's say you have inserted {'section': 'ajouter'} in your context.
i have this website :
http://ozserver.no-ip.com:345/cefinban/recette/1
i would like to highlight the menu link representing the current page,
for example if its "contacts" , the ">> contacts link in the menu
should be bold.
using template i could load a different menu block for each page ? :/
8 matches
Mail list logo