Landscape core settings are defined into web/app.config

Setting name Default Value Explanation
landscapeConfigFileVirtualPath ~/landscape.xml The virtual path to the xml configuration file
landscapeEnableCaching false

Whether to use caching.

When working in non-hosted environments, the cache will not be available

landscapeOutputDocTypePublic "-//W3C XHTML 1.0 Transitional//EN" Public DOCTYPE applied to template transformation results
landscapeOutputDocTypeSystem "" System DOCTYPE applied to template transformation results
landscapeOutputIndent false Whether to indent XML output
landscapeXslExtension .xslt

The file extension to use for XSLT files.

Note that the extension is ASP.NET style, with trailing slash.

Once Landscape is loaded, it reads its sources from the settings defined in the configuration file. Multiple lookup sources can be specified for each landscape component.

Here is a basic configuration file:

<?xml version="1.0" encoding="utf-8" ?>
<landscape xmlns="urn:landscape-config">
    <add path="/Templates" priority="2"/>
    <add path="/InternalTemplates" priority="1"/>
    <add path="/InternalTemplates/Includes" priority="2"/>
    <add path="/Templates/Includes" priority="1"/>
    <add path="/InternalTemplates/Widgets" priority="1"/>
    <add path="/Templates/Widgets" priority="2"/>
    <add priority="1" virtualpath="~/UserControls"/>
    <add alias="urn:myXsltExtension" assembly="MyAssembly" type="Namespace.To.My.Extension.Class"/>

Basically here we defined the folders that are search by Landscape to find templates, includes and widgets.

Also, any custom XSLT extension can be attached to the XSL compiler just by creating the corresponding <add/> node into the <extensions/> section.

Remember that the assembly name MUST BE EXTENSIONLESS

Last edited Oct 30, 2011 at 11:01 PM by Kunyo, version 7


No comments yet.