Related to (closed) Issue #2094 on template inheritance. This PR adds a new function called "import" which works like "include", except it only takes one argument and passes it to the referenced file to be used as "." in that file. * Update tplcontext.go Add {{ render "/path/to/file.ext" $data }} via funcRender * Update tplcontext.go * Refactor funcInclude, add funcImport to enable {{block}} and {{template}} * Fix funcImport return of nil showing up in html * Update godocs for and |
||
|---|---|---|
| .. | ||
| caddyfile.go | ||
| frontmatter.go | ||
| frontmatter_fuzz.go | ||
| templates.go | ||
| tplcontext.go | ||
| tplcontext_test.go | ||