mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
docs: Add notes about multilingual menus
This commit is contained in:
parent
78e5263ca9
commit
0043b48658
1 changed files with 4 additions and 1 deletions
|
@ -30,6 +30,8 @@ A menu is a named array of menu entries accessible on the site under
|
||||||
`.Site.Menus` by name. For example, if I have a menu called `main`, I would
|
`.Site.Menus` by name. For example, if I have a menu called `main`, I would
|
||||||
access it via `.Site.Menus.main`.
|
access it via `.Site.Menus.main`.
|
||||||
|
|
||||||
|
If you make use of the [multilingual feature]({{< relref "content/multilingual.md#menus">}}) you can define menus language independent.
|
||||||
|
|
||||||
A menu entry has the following properties:
|
A menu entry has the following properties:
|
||||||
|
|
||||||
* **URL** string
|
* **URL** string
|
||||||
|
@ -177,7 +179,7 @@ The following is an example:
|
||||||
</ul>
|
</ul>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li>
|
<li>
|
||||||
<a class="" href="{{.URL}}">
|
<a href="{{.URL}}">
|
||||||
{{ .Pre }}
|
{{ .Pre }}
|
||||||
<span>{{ .Name }}</span>
|
<span>{{ .Name }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -192,6 +194,7 @@ The following is an example:
|
||||||
</aside>
|
</aside>
|
||||||
<!--sidebar end-->
|
<!--sidebar end-->
|
||||||
|
|
||||||
|
> **Note**: use the `absLangURL` or `relLangURL` if your theme makes use of the [multilingual feature]({{< relref "content/multilingual.md" >}}). In contrast to `absURL` and `relURL` it adds the correct language prefix to the url. [Read more]({{< relref "templates/functions.md#urls" >}}).
|
||||||
|
|
||||||
## Section Menu for "the Lazy Blogger"
|
## Section Menu for "the Lazy Blogger"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue