You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how to handle this: I have a multilingual page. If I'm e.g. using a LinkIt field link on a page and the user selects a page from the dropdown when editing the french page (not the default language), it should then render a locale-aware link. So /mypage should be /fr/mypage.
For hardcoded page-links in the layout I used {{ get_content from="/mypage" }} {{ url }} {{ /get_content }} which gives me locale-aware links. I think the from parameter for get_content would also work with a page ID which is what LinkIt stores in the mypage.md.
Since I'm relatively new to Statamic I'm not sure if this should/could be handled in LinkIt or some other way (routes?) in Statamic.
Thanks for any hints.
The text was updated successfully, but these errors were encountered:
I was able to solve it by prepending {{ locale_url }} to the page-link coming in from the LinkIt field: <a href="{{ locale_url}}{{ myLinkitField | LinkIt:url}}">
this seems to work on all locales, including the default locale.
I'm not sure how to handle this: I have a multilingual page. If I'm e.g. using a LinkIt field link on a page and the user selects a page from the dropdown when editing the french page (not the default language), it should then render a locale-aware link. So
/mypage
should be/fr/mypage
.For hardcoded page-links in the layout I used
{{ get_content from="/mypage" }} {{ url }} {{ /get_content }}
which gives me locale-aware links. I think the from parameter for get_content would also work with a page ID which is what LinkIt stores in the mypage.md.Since I'm relatively new to Statamic I'm not sure if this should/could be handled in LinkIt or some other way (routes?) in Statamic.
Thanks for any hints.
The text was updated successfully, but these errors were encountered: