Internal links in "Translated for each site group" default link location
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 47
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
Description
Not sure if it's a bug or just a flaw in the editing flow.
We have a setup where several sites use the "Translated for each site group" option. By default, when you insert a link to an entry, it uses the site selected from the entries modal (which is default the site you are editing).
Because of that now the link, for example /uk/contact is the same in all sites instead of, for example /au/contact for the Australian one.
I found that you can edit the link to use "Link to current site", but that's multiple clicks and scrolling away (58 sites in the dropdown).
Can we improve this flow? Some possible options:
- Default select "Link to current site" when in the entry modal (probably not possible as it isn't a site)
- Default to the edit mode in combination with "Link to current site" at the top of the dropdown
- Detect if the site you are editing is the same as you selected in the entry modal and then set it to "Link to current site"
Additional info
- Craft version: 5.3.6
- Plugins & versions: CKEditor 4.2.0, ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the entry modal flow while editing a site with the “Translated for each site group” option enabled. Inspect how the selected site and the “Link to current site” choice are represented in the site dropdown, then define which of the proposed defaults should apply and verify that generated links use the site being edited.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100