List Info

Thread: How to implement this fucntionality ? (current page higlighting)




How to implement this fucntionality ? (current page higlighting)
user name
2006-02-24 03:07:00
Got it working, i was using some flatpage but since only
flatpage.content or flatpage.title is possible if i wanted
to define
<body class=""> , 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 flatpages and
put small
templates.


base.html
---------------
<html>
[...]
<body class="{}">
<div id="container">
	{% include "header" %}
	{% include "menu" %}
         {% block content %}{% endblock %}
	{% include "footer" %}
</div>
</body>
</html>


menu.html
---------------
<div id="menu">
<ul id="arrow">
	<li><a id="nav-ajouter"
href="/cefinban/ajouter_recette">Ajouter</
a>
une recette.</li>
	<li><a id="nav-recherche"
href="/search">Recherche</a>, trouvez
une
recette.</li>
	[...]
</ul>
</div>


css
------
.faq #nav-faq, .contacts #nav-contacts,
.detail #nav-detail, .ajouter #nav-ajouter
{
	color: green;
} 


and here we go 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

How to implement this fucntionality ? (current page higlighting)
user name
2006-02-25 19:04:28
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:

<html>
[...]
<body class="{% block sectionid %}generic{%
endblock %}">

etc...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )