mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Params
|
||||
description: Returns a collection of the shortcode parameters.
|
||||
description: Returns a collection of the shortcode arguments.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
@@ -10,7 +10,7 @@ action:
|
||||
signatures: [SHORTCODE.Params]
|
||||
---
|
||||
|
||||
When you call a shortcode using positional parameters, the `Params` method returns a slice.
|
||||
When you call a shortcode using positional arguments, the `Params` method returns a slice.
|
||||
|
||||
{{< code file=content/about.md lang=md >}}
|
||||
{{</* myshortcode "Hello" "world" */>}}
|
||||
@@ -21,7 +21,7 @@ When you call a shortcode using positional parameters, the `Params` method retur
|
||||
{{ index .Params 1 }} → world
|
||||
{{< /code >}}
|
||||
|
||||
When you call a shortcode using named parameters, the `Params` method returns a map.
|
||||
When you call a shortcode using named arguments, the `Params` method returns a map.
|
||||
|
||||
{{< code file=content/about.md lang=md >}}
|
||||
{{</* myshortcode greeting="Hello" name="world" */>}}
|
||||
|
Reference in New Issue
Block a user