verbb / navigation

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

URL Suffix should be translatable #261

Closed dGilli closed 2 years ago

dGilli commented 3 years ago

What are you trying to do? The URL Suffix field should be translatable since a very common use case would be to link to local anchor points on a page. The URL has to be in a single language for UX.

engram-design commented 3 years ago

We'll need to introduce an intermediary layer to store content per-site, when propagating node content. This is a major change, but will be in 2.0.0

MischaSz commented 3 years ago

Additionally, the whole URL (for manual entries) or the asset (for entry type entries) should be translatable, too. Sometimes, the target URL or the asset is different depending on the site language.

engram-design commented 3 years ago

@MischaSz If the URL needs to be different on every site, you'll have to turn off node propagation and manage nodes per-site. For elements (entries, assets, etc) it'll use the site-specific version of the element you pick, but if you want entirely different elements, you'll also need to manage navs on a per-site basis.

MischaSz commented 3 years ago

@engram-design Thanks for your input - this solves our issue.

MoritzLost commented 3 years ago

@engram-design What exactly do you mean by turn off node propagation? The "Enabled for site" lightswitch on individual nodes or the propagateSiteElements config setting? The documentation is a bit unclear on what the latter does exactly.

engram-design commented 3 years ago

@MoritzLost It's called "Propagate nodes across all enabled sites?" in the navigation settings.

image

The propagateSiteElements is a different setting for edge-cases some people require. It'll be removed as the default behaviour in the next major version, but there as an escape hatch for the moment.