verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 23 forks source link

Menu managed on a secondary site rendering links to primary site #247

Closed russback closed 3 years ago

russback commented 3 years ago

Description I have 2 sites and a menu with the Propagate nodes across all enabled sites? disabled.

When I am in Site B and I create an Entry node, on the frontend, the menu renders URLs to Site A rather than Site B, i.e. on click I end up leaving Site B and landing on Site A.

Template code looks as follows:

<ul class="menu">
    {% nav node in craft.navigation.nodes('primaryNavigation').all %}
        <li {% if node.hasDescendants %}class="menu-item-has-children"{% endif %}>
            {{ node.link }}
            {% ifchildren %}
                <ul class="sub-menu">
                    {% children %}
                </ul>
            {% endifchildren %}
        </li>
    {% endnav %}
</ul>

Additional info

engram-design commented 3 years ago

So with Propagation disabled, you manage navigation nodes for each navigation independently. Can you confirm on each navigation that you're picking the entry using the correct site?

image

For example, the above image you can select entries, but you can potentially select entries from other sites (by design).

russback commented 3 years ago

Completely missed that site menu - sorry!