Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Menus with custom, specified pages #2521

Open
mightyiam opened this Issue Jan 26, 2014 · 4 comments

Comments

Projects
None yet
7 participants
Contributor

mightyiam commented Jan 26, 2014

Currently, the various menu tags offer some customization ability.

It would be nice to be able to use the show_menu tag to render a menu of a number of specifically defined pages.

I would imagine this to be using page_lookup arguments, like so:

{% show_menu 0 100 0 100 "home" "about" "contacts" %}

This would create a menu that has those three pages.

I've provided this outcome, by supplying a custom template to the show_menu tag and it's contents are:

{% load menu_tags %}
{% for child in children %}
{% if child.attr.reverse_id == "about" or child.attr.reverse_id == "home" %}
<li>
    <a class="{% if child.selected %}selected{% endif %}{% if child.ancestor %}ancestor{% endif %}{% if child.sibling %}sibling{% endif %}{% if child.descendant %}descendant{% endif %}" href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">{{ child.get_menu_title }}</a>
</li>
{% endif %}
{% endfor %}
Member

digi604 commented Feb 10, 2014

I like the idea

@yakky yakky added this to the Some Day milestone Sep 29, 2014

Collaborator

mkoistinen commented Oct 26, 2014

+1 from me.

However, perhaps this would be superseded by a new approach? See: https://groups.google.com/forum/#!topic/django-cms-developers/4DysrNgkBL4

Contributor

ldgarcia commented Jan 11, 2015

+1. I also like the idea of pointers to pages in the above link.

@FinalAngel FinalAngel referenced this issue Oct 19, 2015

Open

[META] Menus/pagetree refactor #4597

1 of 9 tasks complete
Owner

FinalAngel commented Oct 19, 2015

Collected in #4597

@FinalAngel FinalAngel closed this Oct 19, 2015

@czpython czpython referenced this issue Mar 29, 2016

Open

[META] Menus cleanup #5112

0 of 26 tasks complete

@czpython czpython reopened this Mar 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment