What I need is a way to create nested menus using <ul> and <li> with
the data coming from a model.  I need to be able to get the entire
list:

<ul>
    <li>Home</li>
    <li>Some Category
        <ul>
            <li>Page
                <ul>
                    <li>Even Deeper</li>
                    <li>Another Deeper Page</li>
                </ul>
            </li>
            <li>Another Page</li>
        </ul>
    </li>
    <li>Some Other Page</li>
</ul>

But also be able to pull a sub tree and tell it how deep to go:

<ul>
    <li>Page</li>
    <li>Another Page</li>
</ul>

Here is a sample of the model for the data...
class Page(models.Model):
    title = models.CharField(maxlength=200)
    slug = models.SlugField(prepopulate_from = ['name'])
    parent = models.ForeignKey('self', blank=True, null=True)
    content = models.TextField()
    active = models.BooleanField(default = True)
    show_in_menu = models.BooleanField(default = True)

I have spent the past week or so trying to figure this out and just
cant quite figure out how to do it... any help at all would be greatly
appreciated.  And for the record, Django ROCKS!!

Eric


--~--~---------~--~----~------------~-------~--~----~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to