Deprecated Functions

The following Canvas functions are considered deprecated.

It is recommended that you use the alternative functions listed below.

Collections

collection

Alternatives: cms.collection

collection_raw

Alternatives: cms.collection

Forms

form

Alternatives: cms.form

form_raw

Alternatives: cms.form

form_open

Alternatives: cms.form

form_close

Alternatives: cms.form

Menus

menu

Alternatives: cms.menu

menu_raw

Alternatives: cms.menu

Other

file

Alternatives: include

file returns the file path:

{{ file('path/to/file') }}

Arguments

Argument Description Type
filepath The path to the file String

import

Alternatives: include

import returns the contents of a file:

{{ import('includes/messages.html') }}

Note: the import function no longer renders HTML content within the imported file.

Arguments

Argument Description Type
filepath The path to the file, relative to the views directory String