mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
taxonomy: display translated title #772
This commit is contained in:
parent
22a36ca7b2
commit
af209c3f49
8 changed files with 9 additions and 9 deletions
|
@ -4,7 +4,7 @@
|
|||
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||
{{- $title := .Title }}
|
||||
{{- if eq .Kind "taxonomy" }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||
{{- $title := .Title }}
|
||||
{{- if eq .Kind "taxonomy" }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</header>
|
||||
{{- $page := . }}
|
||||
|
||||
{{- $title := default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title := default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
||||
{{- .Content }}
|
||||
{{- $lastCapital := "" }}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{{- $depth = add $depth 1 }}
|
||||
{{- $title := $to.Title }}
|
||||
{{- if eq $to.Kind "taxonomy" }}
|
||||
{{- $title = default (default $to.Data.Plural (i18n $to.Data.Plural)) .Title }}
|
||||
{{- $title = default (default $to.Data.Plural (i18n $to.Data.Plural)) $to.Params.Title }}
|
||||
{{- else if eq $to.Kind "term" }}
|
||||
{{- $taxonomy_page := $to.Site.GetPage $to.Data.Plural }}
|
||||
{{- $title = default (default $to.Data.Singular (i18n $to.Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
{{- if eq $outputFormat "searchpage" }}
|
||||
{{- $title = T "Search" }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{{- if eq $outputFormat "searchpage" }}
|
||||
{{- $title = T "Search" }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
@ -50,7 +50,7 @@
|
|||
{{- if eq $outputFormat "searchpage" }}
|
||||
{{- $title = T "Search" }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $taxonomy_title := default (default $taxonomy_page.Data.Plural (i18n $taxonomy_page.Data.Plural)) $taxonomy_page.Title }}
|
||||
{{- $taxonomy_title := default (default $taxonomy_page.Data.Plural (i18n $taxonomy_page.Data.Plural)) $taxonomy_page.Params.Title }}
|
||||
{{- with $term_pages }}
|
||||
<div class=" taxonomy-{{ $taxonomy }} term-list cstyle {{ $style }} {{ $class }}" title="{{ $taxonomy_title }}"{{ if $color }}{{ printf " style=\"--VARIABLE-TAGS-BG-color: %s;\"" $color | safeHTMLAttr }}{{ end }}>
|
||||
{{- if $icon }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{{- if eq $outputFormat "searchpage" }}
|
||||
{{- $title = T "Search" }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
||||
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Params.Title }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
||||
|
|
Loading…
Reference in a new issue