Y
Y
Yuri2018-08-20 08:23:32
Django
Yuri, 2018-08-20 08:23:32

Menu from application pages and static pages?

Good day! There is a model of static pages and application pages. Is there any way/battery to create a menu where one could specify that for example this menu item is bound to a static page and the other one to an application?
Or can it be done on your own? I just do not quite understand where to dig, what to look for?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aleksey Solovyev, 2018-08-20
@alsolovyev

Create a boolean variable isApp
Pass it to the template:

<nav>
  <a href="">uno</a>
  <a href="">dos</a>
  <a href="">tres</a>
  {% if isApp %}
    <a href="">application</a>
  {% endif %}
</nav>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question