LassoScript Utility
Basics Browse Detail

[LJAX_Include]

Tag Link [LJAX_Include] Category LJAX
Type Substitution Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type String Security None
Implementation Sets Lasso 8.5

Description

[LJAX_Include] allows an include to be processed when different LJAX targets are called. This tag should only be used when a page is part of an LJAX-enabled solution. More information about how to use LJAX on a site can be found in the Lasso Language Guide.

Lasso pages can accept a -Target action parameter which specifies an LJAX target that should be returned for the page. Lasso pages are normally called with no target. When a site is LJAX-enabled pages will initially be called with no target, then later be called with a specific target in order to dynamically update portions of a page.

The [LJAX_Include] tag accepts a -Target parameter which specifies what LJAX target (specified as a string) or list of targets (specified as an array of strings) the included file should be processed for. If specified with an -AnyTarget parameter then the included file will be processed when any LJAX target is called.

If specified with a -NoTarget parameter then the included file will be processed when no LJAX target is called. If both -NoTarget and -Target are specified then the included file will be processed when either no target or the specific LJAX target or targets are called.

Syntax

[LJAX_Include: 'include.lasso', -NoTarget]

[LJAX_Include: 'include.lasso', -NoTarget, -Target='content']

[LJAX_Include: 'include.lasso', -AnyTarget]

Parameters

Required Parameters
File Path The path to the file to include.
Optional Parameters
-NoTarget If specified then the included file will be processed when the page is called with no LJAX target.
-AnyTarget If specified then the included file will be processed when the page is called with any LJAX target.
-Target Accepts either a string or an array of strings. If specified then the included file will be processed if the specified target or targets is called.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Related Tags