diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2021-09-17 14:00:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 13:00:36 -0600 |
commit | 5fda9610f907482497a7b32abb2ab2f85a4e6906 (patch) | |
tree | 847479be65b3267276ce2ea3a79be10c3e723c16 /caddyconfig/caddyfile/testdata/import_test2.txt | |
parent | 3f2c3ecf85b590473030b21fd2b5fc9c8ef88744 (diff) |
templates: Add 'import' action (#4321)
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
Diffstat (limited to 'caddyconfig/caddyfile/testdata/import_test2.txt')
0 files changed, 0 insertions, 0 deletions