I have a template block tag {% ifactive %} that lets you highlight the
currently active page using similar syntax as the {% url %} tag (i.e.,
you can specify urlpattern names and arguments in the same way), e.g.:
Page 1
Page 2
...
Page N
The code for this is at http://demo.apture.com/demo/ifacti
A slight variation that doesn't require repeating the whole navigation
div in each base_SECTION.html template:
# base.html
{% block content %}...{% endblock %}
{% block navigation %}
Section
1
Section
2
{% endblock %}
# base_section1.html
{% extends "base.html" %}
{% block active_secti
Alex,
As the docs state, you can place code in a {% block [name] %} and it gets
overwritten when another template has that block defined. This is the
base.html: http://paste.pocoo.org/show/87935/
This is a subnavigation with a different active 'tab' in the navigation bar
called base_product.h
Hi Gerard,
sorry but I don't understand your setup.
Could you show us some sample code which does the actual navigation list?
Thank you very much for your time
On Tue, Sep 30, 2008 at 1:53 PM, Gerard Petersen <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I don't understand why it's needs to be so c
Steven,
Sorry, I replied to the wrong message in this thread. Your setup is actually
quite charming.
Regards,
Gerard.
Steven Armstrong wrote:
> Alex Rades wrote on 09/30/08 09:03:
>> Hi,
>> what kind of pattern do you use to add a class attribute to the
>> current page being viewed?
>> I mean
Hi All,
I don't understand why it's needs to be so complicated. When using a 'double'
template inheritance, e.g: base > base_products > product_add
There's only one place where you have to maintain some navlist html/css code.
This is where the 'active' attribute is maintained. So with multiple
Alex Rades wrote on 09/30/08 09:03:
> Hi,
> what kind of pattern do you use to add a class attribute to the
> current page being viewed?
> I mean the usual:
>
>
> Home
> Products
> FAQ
> contact us
>
>
> I have this snipped of html defined in the base template and all pages
> inherit from it.
On 30 Sep 2008, at 8:03 am, Alex Rades wrote:
> while it's very useful, I don't like it too much, so I'm asking you
> what is the best practice here.
I tend to do:
{% for page in page_list %}
{{ page }}
{% endfor %}
But that obviously requires you to have a list of pages in your co
Hi,
what kind of pattern do you use to add a class attribute to the
current page being viewed?
I mean the usual:
Home
Products
FAQ
contact us
I have this snipped of html defined in the base template and all pages
inherit from it.
Currently I'm using this templatetag:
http://gnuvince.wordpress
9 matches
Mail list logo