-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Description
While ranging through .Page.AllTranslations or .Page.Translations, it would be useful to know if the current language is the defaultContentLanguage. Those methods return the page collection sorted by language weight; the first may or may not be the default.
This would be a convenience method so that you could do this:
{{ range .AllTranslations }}
{{ if .Language.IsDefault }}
...
{{ end }}
{{ end }}
instead of this:
{{ range .AllTranslations }}
{{ if eq .Site .Sites.Default }}
...
{{ end }}
{{ end }}
The first is, at least to me, easier to understand
If we do something like this, the API may depend on pending dimensions work.
cmahnke