[include] inserts the specified format file into the current format file. Any Lasso code in the included format file is executed as if were placed in the current format file at the location of the [include] method.
The first parameter is required and is the name of the format file to be included.
A boolean parameter -local optionally instructs Lasso to determine the file path relative to the current file.
Container methods cannot be started within one file and closed in the other, but the [include] method can be contained within container methods which are opened and closed within the same format file.
Note: [Loop_Count] cannot be used within an include file to get the current repetition of a container method around the [include] method. Instead, store the loop count in a variable.
Note: In the scope of Lasso 9 local variables (#) do not descend into (or out of) included files. Instead use thread-global variables ($) to communicate relevant information.
[include] is directly analogous to [web_response->include].
Include('File Path')
Use the [Include] method. The following code includes a header named Header.lasso before the contents of the page.
Code
include('Header.lasso')
... Format File Body ...
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments