Web.Stencils.TWebStencilsPathTemplateItem.Template

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Template: string read FTemplate write FTemplate;

C++

__property System::UnicodeString Template = {read=FTemplate, write=FTemplate};

Properties

Type Visibility Source Unit Parent
property published
Web.Stencils.pas
Web.Stencils.hpp
Web.Stencils TWebStencilsPathTemplateItem

Description

The path template matches a request path and extracts variables.

A template is a request path starting with '/' and may include '{name}' as a variable marker.

For example:

'/mysite/{filename}/{arg1}'

The variables are accessible in the script using '@page.<variable name>'. When the {filename} variable is not specified, the last path segment is used as the value of the 'filename' variable.

When a path template contains the '{filename}' variable, only the portions before and after {filename} are used to build a file path. Later, the file path will be expanded to the file system path using the dispatcher functionality.

Note: The '*' symbol is used as a special marker when a matching template or the template file is not found.

See Also