diff options
author | Corné Haasjes <c.haasjes@lumc.nl> | 2025-04-01 20:31:57 +0200 |
---|---|---|
committer | Corné Haasjes <c.haasjes@lumc.nl> | 2025-04-01 20:31:57 +0200 |
commit | 160d998fa0f96219ae9b7e45d3250ea1d10edede (patch) | |
tree | 982c9ed6d46f195a4b7c544f9fe7b5f91ddc5bbc | |
parent | b8715b0cf2a4a371c45703704da9d8232f6cf907 (diff) |
Fix get_hook function
-rw-r--r-- | layouts/partials/functions/get_hook.html | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/layouts/partials/functions/get_hook.html b/layouts/partials/functions/get_hook.html index 79c9987..3e6b4fb 100644 --- a/layouts/partials/functions/get_hook.html +++ b/layouts/partials/functions/get_hook.html @@ -9,15 +9,11 @@ {{ $hook := .hook }} {{ $context := .context }} -{{ $hookName := $hook.Name }} -{{ $hookType := $hook.Type }} {{ if not (hasSuffix $hook ".html") }} {{ $hook = printf "%s.html" $hook }} {{ end }} -{{ $hook_path := path.Join "layouts/partials/hooks" $hook }} - -{{ if fileExists $hook_path }} - {{ partial $hook_path $context }} +{{ if fileExists (path.Join "layouts/partials/hooks" $hook) }} + {{ partial (path.Join "hooks" $hook) $context }} {{ end }}
\ No newline at end of file |