Posts

Showing posts with the label Scriban

Sitecore scriban for language dropdown

 We using scriban template to load language selector for the website , as not using out of box SXA language selector, we need more control from content author side. We have template with language multilist field , so that the content author have control to select or deselect the languages as per their wish. Scriban template to load language selector: Loop through all the languages content author selected from the field " Site Languages " and compare with the context language to make it as active language Url will be dynamic based on the language   <ul>        {{ for languages in (sc_followmany i_datasource "Site Languages"  )  }}              {{ itemLanguage=(sc_field  languages 'Regional Iso Code') }}              {{itemLanguage=(itemLanguage | string.downcase)}}       ...