(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

Let's take the following CSS stylesheet file and put it into a page.

By using VV::css() inside a style, we've enabled this stylesheet for that specific page.