Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5967221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:54:46+00:00 2026-05-22T19:54:46+00:00

My django based website will have 3 seperate menus. The items of first one

  • 0

My django based website will have 3 seperate menus. The items of first one are: contact, about, disclosures. The second one will have: terms and condtions, privacy policy, copyright. And items of main menu are: Home, link1, link2, link2…. The first two menus will have fixed items, and the items of last one may change. As I will be using forloop in the template, what is the best approach for creating those menus. The webpages will have just a title and content.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:54:47+00:00Added an answer on May 22, 2026 at 7:54 pm

    I like to use inclusion template tags for dynamic menus.

    In my-app/templatetags/myappmenu.py, I have something like:

    from django import template
    register = template.Library()
    @register.inclusion_tag('my-app/menu.html')
    def myappmenu():
        return [("label1", "link1"), ("label2", "link2")]
    

    Then, in your template you can loop over the items and produce the menu in the format you desire (<p>, <ul>, etc.).

    If you need to make items in the menu appear conditionally, you can add them to the list by checking permissions in the template tag; just pass the request or user object as argument to the template tag function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website tracked using Google Analytics. It is a Django-based website, so
I'm creating a Django powered website that will have numerous applications (Blog, Shop, Portfolio,
I have the following setup for my Django based website: <VirtualHost 10.0.0.4> DocumentRoot /home/joel/www
Can someone give specific steps on how to implement hosting of a Django-based website
I have a Django form that uses a different number of fields based on
I am programming a django based website. I actually use a small computer under
I'm about to make a dynamic website in Django so that user can change
According to the Hyde website , Hyde is based on the Django template engine.
I'm working on a Django 1.4-based social networking website as a personal project. I'm
I have become very swamped by my django website since I have started using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.