summaryrefslogtreecommitdiffstats
path: root/tpl/internal/go_templates/texttemplate/hugo_template.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/internal/go_templates/texttemplate/hugo_template.go')
-rw-r--r--tpl/internal/go_templates/texttemplate/hugo_template.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/tpl/internal/go_templates/texttemplate/hugo_template.go b/tpl/internal/go_templates/texttemplate/hugo_template.go
index acfa2f166..78be55e18 100644
--- a/tpl/internal/go_templates/texttemplate/hugo_template.go
+++ b/tpl/internal/go_templates/texttemplate/hugo_template.go
@@ -60,9 +60,10 @@ func NewExecuter(helper ExecHelper) Executer {
}
type (
- pageContextKeyType string
- hasLockContextKeyType string
- stackContextKeyType string
+ pageContextKeyType string
+ hasLockContextKeyType string
+ stackContextKeyType string
+ callbackContextKeyType string
)
const (
@@ -70,6 +71,9 @@ const (
PageContextKey = pageContextKeyType("page")
// Used in partialCached to signal to nested templates that a lock is already taken.
HasLockContextKey = hasLockContextKeyType("hasLock")
+
+ // Used to pass down a callback function to nested templates.
+ CallbackContextKey = callbackContextKeyType("callback")
)
// Note: The context is currently not fully implemented in Hugo. This is a work in progress.