From 0ba9fb9631f6f97ae50929006937b540b1ff8a37 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Sat, 3 Dec 2016 20:12:12 +0100 Subject: [PATCH] docs: Document querify template func Closes #2733 --- docs/content/templates/functions.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md index a2c560206..68bebb0d7 100644 --- a/docs/content/templates/functions.md +++ b/docs/content/templates/functions.md @@ -880,6 +880,16 @@ Takes a string and sanitizes it for usage in URLs, converts spaces to "-". e.g. `{{ . }}` +### querify + +Takes a set of key-value pairs and returns a [`url.Values`](https://godoc.org/net/url#Values) object. The [`Encode`](https://godoc.org/net/url#Values.Encode) method turns the pairs into a [query string](https://en.wikipedia.org/wiki/Query_string) that cen be postpended to a url. E.g. + + Search + +will be rendered as + + Search + ## Content Views