mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-05 11:27:26 +00:00
Add the include_only function to render a template without access to the current context
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
"include_only" function
|
||||
--TEMPLATE--
|
||||
FOO
|
||||
{{ include_only("foo.twig") }}
|
||||
|
||||
BAR
|
||||
--TEMPLATE(foo.twig)--
|
||||
FOOBAR
|
||||
--DATA--
|
||||
return []
|
||||
--EXPECT--
|
||||
FOO
|
||||
|
||||
FOOBAR
|
||||
|
||||
BAR
|
||||
Reference in New Issue
Block a user