From 26e10a690347e74e8777380ec6e4b66b92c26f88 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Sun, 9 Dec 2018 10:51:52 -0500 Subject: [PATCH] Fix the name and arg mismatch between partial defn and call --- content/en/functions/dict.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/content/en/functions/dict.md b/content/en/functions/dict.md index 9887dbaf9..007cc30c5 100644 --- a/content/en/functions/dict.md +++ b/content/en/functions/dict.md @@ -22,20 +22,25 @@ aliases: [] `dict` is especially useful for passing more than one value to a partial template. -## Example: `dict` with Embedded SVGs +## Example: Using `dict` to pass multiple values to a `partial` -The partial below creates a SVG and expects `fill` `height` and `width` from the caller: +The partial below creates a SVG and expects `fill`, `height` and `width` from the caller: + +**Partial definition** {{< code file="layouts/partials/svgs/external-links.svg" download="external-links.svg" >}} - + {{< /code >}} -These values can be stored in one object with `dict` and passed to the partial: +**Partial call** + +The `fill`, `height` and `width` values can be stored in one object with `dict` and passed to the partial: {{< code file="layouts/_default/list.html" >}} -{{ partial "svg/link-ext.svg" (dict "fill" "#01589B" "size" 10 "width" 20 ) }} +{{ partial "svgs/external-links.svg" (dict "fill" "#01589B" "width" 10 "height" 20 ) }} {{< /code >}}