(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.

Description

VV::include() lets you put the contents of one page into another page.

Parameters

pathname

Path to a PHP file to import and evaluate relative from project root.

Example

relative

Path provided to pathname will be a relative when this parameter is true (default). Set to false to make path absolute.

Example

Return values

This method will return whatever the compiled output of the included PHP file will be.

Examples

Basic usage

Consider the following page snippet

Let's put this snippet into another page

By importing the snippet with VV::include() we have placed the banner tag and its contents into another page.