Skip to content

Commit 922aa91

Browse files
authored
content: Improve description of partial lookup logic
1 parent 072536e commit 922aa91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎content/en/templates/types.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ Execute the _partial_ template by calling the [`partial`] or [`partialCached`] f
285285
{{ partial "footer.html" . }}
286286
```
287287

288-
Unlike other template types, _partial_ template selection is based on the file name passed in the `partial` or `partialCached` call. Hugo does not consider the current page kind, content type, logical path, language, or output format when searching for a matching _partial_ template. However, Hugo _does_ apply the same name matching logic it uses for other templates. This means it tries to find the most specific match first, then progressively looks for more general versions if the specific one isn't found.
288+
<!-- https://github.com/gohugoio/hugo/pull/13614#issuecomment-2805977008 -->
289+
Unlike other template types, Hugo does not consider the current page kind, content type, logical path, language, or output format when searching for a matching _partial_ template. However, it _does_ apply the same name matching logic it uses for other template types. This means it tries to find the most specific match first, then progressively looks for more general versions if the specific one isn't found.
289290

290291
For example, with this call:
291292

0 commit comments

Comments
 (0)