summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl/shortcodes.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/tplimpl/shortcodes.go')
-rw-r--r--tpl/tplimpl/shortcodes.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/tpl/tplimpl/shortcodes.go b/tpl/tplimpl/shortcodes.go
index 8577fbeed..40fdeea5d 100644
--- a/tpl/tplimpl/shortcodes.go
+++ b/tpl/tplimpl/shortcodes.go
@@ -139,6 +139,18 @@ func templateNameAndVariants(name string) (string, []string) {
return name, variants
}
+func resolveTemplateType(name string) templateType {
+ if isShortcode(name) {
+ return templateShortcode
+ }
+
+ if strings.Contains(name, "partials/") {
+ return templatePartial
+ }
+
+ return templateUndefined
+}
+
func isShortcode(name string) bool {
return strings.Contains(name, "shortcodes/")
}