IO::Handle , Apache::Request , etc. After the optional third output argument can come an optional reference to a hash or a list of name, value pairs providing further options for the output. The only option currently supported is binmode which, when set to any true value will ensure that files created but not any existing file handles passed will be set to binary mode.
Alternately, the binmode argument can specify a particular IO layer such as :utf8. The process method returns 1 on success or undef on error.
The error message generated in the latter case can be retrieved by calling the error method. Thus, the following are equivalent. Errors are represented in the Template Toolkit by objects of the Template::Exception class. If the process method returns a false value then the error method can be called to return an object of this class. The type and info methods can called on the object to retrieve the error type and information string, respectively. This method is also overloaded onto the stringification operator allowing the object reference itself to be printed to return the formatted error string.
The Template module delegates most of the effort of processing templates to an underlying Template::Service object. This method returns a reference to that object. The Template::Service module uses a core Template::Context object for runtime processing of templates. This method is a simple wrapper around the Template::Context method of the same name. It returns a compiled template for the source provided as an argument. The following list gives a short summary of each Template Toolkit configuration option.
See Template::Manual::Config for full details. Remove leading and trailing whitespace from template output default: 0. Allow absolute file names, e. Allow relative filenames, e. Name of error template or reference to hash array mapping error types to templates. Maximum number of compiled templates to cache in memory default: undef - cache all. Filename extension for compiled template files default: undef - don't compile. Root of directory in which compiled template files should be written default: undef - don't compile.
They are called in the order defined, piping the output of one into the input of the next. Multiple directives can be included within a single tag when delimited by semi-colons. Note however that the TAGS directive must always be specified in a tag by itself. It's very nice.
Click to hide the menu and go all widescreen! Contents Top Close Open. Tag Styles Top Close Open. Outline Tags Top Close Open. Comments Top Close Open. Chomping Whitespace Top Close Open. Block Directives Top Close Open. A rolling stone gathers no moss, And Keith is sure to follow. Chaining Filters Top Close Open. All Rights Reserved. The new attribute is only supported by local includes. However, remote includes don't support this attribute.
All rights reserved. Various trademarks held by their respective owners. Salesforce B2C Commerce This is a remote include. Purpose The template being included can be as complex as an entire page template, or as simple as a single line of HTML code. Note: Includes from another server are not supported. The template name can have the suffix ". If the suffix isn't present, it's appended automatically. The included template, contained in the Pipeline Dictionary, is determined by the template attribute of the Content object inside of the Pipeline Dictionary.
Example: The following example shows a standard include of a template. This is part of the B2C Commerce Web Server configuration, because remote includes are sent back to the Web Adapter, which performs another call to the application server. If the maximum include depth is reached, the B2C Commerce Web Server logs an error and cancels further request processing.
Example: This example shows an include that combines data into one template. The dwmarker tag is only suppressed for the include tag itself, and not for any child-"isinclude" inside of that "include" template.
0コメント