0

I have Link field in Sitecore, user could choose any link at this field, site has mutli language and culture. In case of user set a page at link field that does not have language in current context, I need to display neutral (default English language) link. How to do it if I have rendering like

 @using (Html.Glass().BeginRenderLink(link, x => x.MyUrl, listOfProps, isEditable: true))
 {
     @Html.Glass().Editable(link, m => m.Label)
 }
0

Sitecore datatypes links, multilist, tree list, drop links etc. should be set as Shared fields in Sitecore templates as they dont need any language specific versions for themselves (if you look at their RAW values, they are GUIDs or list of GUIDs). Instead the item these fields point to have language specific versions.


If there is requirement not to make these fields shared across the languages, try to add field level fallback for these fields and set fallback language to English.

  • it not about fallback, it is about url generator... – Arbejdsglæde Feb 12 '20 at 9:59
  • Ghanendra's note about field-level fallback is what you want in your case. With that enabled, it'll either present the link selected in that language, or it'll provide the fallback language however you have it configured in system/Languages. – Ken McAndrew Feb 12 '20 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.