It's not so hard to do recursion using templates as well as without them.
1. Write a template tag that takes one menu item as a parameter. I
don't have enough time to write the whole tag this time, but the
example usage should be like this:
{% load recursive_menu %}
{% menu root_category %}
2. It
On Mon, 2007-03-05 at 10:31 +0100, Jens Diemer wrote:
> Chris Moffitt schrieb:
> > I've implemented a similar hierarchy for categories in Satchmo using
> > elementtree. You can see my example here-
> > http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/shop/templatetags/category_di
Chris Moffitt schrieb:
> I've implemented a similar hierarchy for categories in Satchmo using
> elementtree. You can see my example here-
> http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/shop/templatetags/category_display.py
But you have html code in your programm. (The und
I've implemented a similar hierarchy for categories in Satchmo using
elementtree. You can see my example here-
http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/shop/templatetags/category_display.py
-Chris
--~--~-~--~~~---~--~~
You received this m
Sorry, I didn't find a perfect solution, but I think that it can be done.
You can use the "unordered list" filter in the template and fill an array in
the view using recursive methods. Then you pass the array to the filter and
it's done. You can also create your own filter tag, is not difficult,
Grupo Django schrieb:
> Hello, I have been looking around about some information about how to
> do recursion in templates but what I found didn't help me.
> ...
>
> And the plan is to create a menu like this:
> - Entry 1
> -- Subentry 1_1
> -- Subentry 1_2
> sub_Subentry 1_2_1
> - Entry 2
>
Hello, I have been looking around about some information about how to
do recursion in templates but what I found didn't help me.
This is the case:
class Menu(models.Model):
id = models.AutoField('id', primary_key=True)
parent = models.ForeignKey('self','id',null=True,blank=True)
7 matches
Mail list logo