I assume you are talking about a html element with some options inside it, to allow you to navigate through the site?
This is (personally) how I'd do it, although others may prefer a different style (you could probably go as far to make this whole thing "classy").
(hand typed code, may need re-writing)
--- views.py ---
page = "dashboard/help/users"
RequestContext(request, {
'section' : page.split("/")
}
--- layout.html ---
{% if section.0 = 'dashboard' %}
display stuff relating to dashboard only
{% if section.1 = 'help' %}
display stuff relating to dashboard/help only
{% endif %}
{% endif %}
-- On Mon, Jun 27, 2011 at 6:27 AM, Venkatraman S <venkat83@gmail.com> wrote:
Hi,
I was looking for possible suggestions in implementing sidebars - i have a truck load of screens and need the sidebar to change dynamically base don the view. Most of the siderbar-conten is just links.
I was thiking of including the various sidebar options in the base.html and then include a flag to check whether it has to be rendered or not; and in the view pass the relevant flag.
Any other ideas?
-venkat
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment