New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static_placeholder in a main menu dropdown #6574

leslieewing opened this Issue Dec 10, 2018 · 2 comments


None yet
2 participants
Copy link

leslieewing commented Dec 10, 2018

Am trying to display a static_placeholder within a menu.html file. I have a custom menu.html file that has a few {% static_placeholder %} tags to display a different image or some other type of content in the main menu drop down; however, I am not seeing an edit area for those when I click to Edit.

    {% if child.parent.get_menu_title == "Personal" %}
        {% static_placeholder 'personal_menu_content' %}
    {% elif child.parent.get_menu_title == "Business" %}
        {% static_placeholder 'business_menu_content' %}
    {% elif child.parent.get_menu_title == "Who We Are" %}
        {% static_placeholder 'who_menu_content' %}
    {% endif %}

Is this even doable? If not, is there another way to add an editable area within a main menu?

Expected behaviour

When I click the icon to show the different placeholders I would expect the "Personal Menu Content" and the other two static placeholders seen above to appear.

Actual behaviour

I do not see any of the above placeholders in the edit area. I see regular placeholders and even a static placeholder I put in the footer, but none of the ones I have in the main menu are showing


  • Python version: 3.6.6
  • Django version: 1.11.15
  • django CMS version: 3.5.3

This comment has been minimized.

Copy link

jrief commented Dec 28, 2018

@leslieewing I would create a template for each menu title/static placeholder. Use template inheritance to avoid code duplication. In my projects, my base template specifies

<footer class="footer">
{% block footer %}{% endblock footer %}

and inheriting templates then, for instance would use

{% block footer %}
    {% static_placeholder "personal_menu_content" %}
{% endblock footer %}

Create a such a template for each page requiring a special static placeholder.


This comment has been minimized.

Copy link

leslieewing commented Jan 4, 2019

@jrief - thanks - I actually got the static placeholder to appear in the edit view; however, the plugin I put in it does not appear in the menu. I have a drop down menu that needs to have a replaceable plugin for specific menus. For example, the Personal parent menu item has an image and description that appears when you are viewing the dropdown.


The image shows that you are hovering over Personal and the dropdown appears below it. To the far right you'll see "Personal" - that needs to be where the plugin from the static placeholder needs to appear. The Business and Who We Are menu items also have a separate dropdown and need separate plugins from a static placeholder to appear in that area.

I did update the code in the menu.html to be

                {% if child.parent.get_menu_title == "Personal" %}
                    {% block menu_personal %}{% endblock menu_personal %}
                {% elif child.parent.get_menu_title == "Business" %}
                    {% block menu_business %}{% endblock menu_business %}
                {% elif child.parent.get_menu_title == "Who We Are" %}
                    {% block menu_who %}{% endblock menu_who %}
                {% endif %}

And in my template I have

{% block menu_personal %}
    {% static_placeholder 'personal_menu_content' %}
{% endblock menu_personal %}

So, the static placeholder area appears in the Edit view; however, the plugin I put into that placeholder does not show up in the dropdown where I would expect it to appear.

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