(Vegvisir 2, Vegvisir 3)
VV::include()
Inline contents of one page inside another page.
The syntax and functionality is similar to VV::embed()
, except it executes included code.
VV::include()
lets you put the contents of one page into another page.
pathname
Path to a PHP file to import and evaluate relative from project root.
relative
Path provided to pathname
will be a relative when this parameter is true
(default). Set to false
to make path absolute.
This method will return whatever the compiled output of the included PHP file will be.
Consider the following page snippet
= Snippet::put("docs/API/PHP/VV/include/example-1-0", Snippet::PHP) ?>Let's put this snippet into another page
= Snippet::put("docs/API/PHP/VV/include/example-1-1", Snippet::PHP) ?>By importing the snippet with VV::include()
we have placed the banner
tag and its contents into another page.