verbb / navigation

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

URL Suffix is not translatable #360

Open amphibian opened 1 year ago

amphibian commented 1 year ago

Describe the bug

On my two-language site, the URL Suffix for a navigation node is not being saved per-site, breaking my anchor links in one site as soon as I change it for the other.

Looking a this FR from 2021, it appears as though this should be working as of 2.0?

Steps to reproduce

  1. Create a navigation enabled for two sites.
  2. Add a node with a URL suffix.

Craft CMS version

4.4.10.1

Plugin version

2.0.19

Multi-site?

Yes

Additional context

No response

engram-design commented 1 year ago

Looks like that issue trailed off into something unrelated, and this actually hasn't been implemented.

The workaround for the moment is to create navigation nodes for every site. To do this, you need to set the Propagation Method to Only save nodes to the site they were created in, so that a node is specific to every site. Currently, these sorts of settings aren't translatable for nodes.

martinhellwagner commented 3 months ago

@engram-design

Does this also apply to Custom URLs? It would be great to be able to set the propagation method to "Save nodes to all sites enabled for this navigation", then add a Custom URL link to the first multisite and have it added to all other multisites as well – but with the option to change the title as well as the URL for each site individually after that.

engram-design commented 3 months ago

It should apply to any node type, when you add a node with the propagation method set correctly. It'll be added across all enabled sites for that navigation, after which you can change the title of the node per-site.

martinhellwagner commented 3 months ago

But only the title of the node is changeable on a per-site basis, not the URL, right? Is there any possibility to add the per-site translation of the URL as a feature to the plugin?

engram-design commented 3 months ago

Sorry, I see what you mean. Correct, the URL is not site-specific for custom URLs. It's something I'll consider for sure, but will likely have to be in Craft 5 where there are some content changes that'll make this easier. Otherwise, we would need to create our own content structure to handle site-specific content that isn't built-in to Craft like the title or slug.

martinhellwagner commented 3 months ago

Got it, thanks!