mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
The `langCode.html` partial template is added to the `layouts/partials/function` directory. This template is used to check if the current language code matches the site's language code. It iterates over the language codes and sets a boolean variable `$res` to `true` if there is a match. The template then returns the value of `$res`. This partial template can be used in other templates to conditionally render content based on the language code.
10 lines
146 B
HTML
10 lines
146 B
HTML
{{- $res := false -}}
|
|
|
|
{{- range . -}}
|
|
{{- if eq site.LanguageCode . -}}
|
|
{{- $res = true -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- return $res -}}
|