navigation icon indicating copy to clipboard operation
navigation copied to clipboard

URL Suffix is not translatable

Open amphibian opened this issue 2 years ago • 6 comments

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

amphibian avatar Jul 11 '23 19:07 amphibian

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.

engram-design avatar Jul 12 '23 03:07 engram-design

@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.

martinhellwagner avatar Apr 10 '24 14:04 martinhellwagner

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.

engram-design avatar Apr 11 '24 10:04 engram-design

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?

martinhellwagner avatar Apr 11 '24 10:04 martinhellwagner

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.

engram-design avatar Apr 11 '24 11:04 engram-design

Got it, thanks!

martinhellwagner avatar Apr 11 '24 12:04 martinhellwagner