Author: olli
Date: Mon May 4 14:31:22 2015
New Revision: 1677606
URL: http://svn.apache.org/r1677606
Log:
update (required configuration of template mode handler), move include example
up
Modified:
sling/site/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.mdtext
Modified:
sling/site/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.mdtext
URL:
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.mdtext?rev=1677606&r1=1677605&r2=1677606&view=diff
==============================================================================
---
sling/site/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.mdtext
(original)
+++
sling/site/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.mdtext
Mon May 4 14:31:22 2015
@@ -41,7 +41,7 @@ The _Non-Caching Template Resolver_ (the

-The _HTML5 Template Mode Handler_ is configured to handle all paths which
match the pattern `*.html`.
+At least one template mode handler (e.g. _HTML5 Template Mode Handler_) needs
to be configured with a pattern to process templates by Sling Scripting
Thymeleaf:

@@ -51,7 +51,9 @@ Sling Scripting Thymeleaf comes with its
## include
-The resource object
([`Resource`](http://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/Resource.html))
or the path (`String`) to the resource object to include in the current
request processing. If this path is relative it is appended to the path of the
current resource whose script is including the given resource.
+`<header data-sling-include="${resource}" resourceType="'example/page/header'"
unwrap="true"/>`
+
+`include` - The resource object
([`Resource`](http://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/Resource.html))
or the path (`String`) to the resource object to include in the current
request processing. If this path is relative it is appended to the path of the
current resource whose script is including the given resource.
### supported options (* = [RequestDispatcher
option](http://sling.apache.org/apidocs/sling7/org/apache/sling/api/request/RequestDispatcherOptions.html))
@@ -61,9 +63,6 @@ The resource object ([`Resource`](http:/
* `resourceType` (`String`) *: The resource type of a resource to include. If
the resource to be included is specified with the path attribute, which cannot
be resolved to a resource, the tag may create a synthetic resource object out
of the path and this resource type. If the resource type is set the path must
be the exact path to a resource object. That is, adding parameters, selectors
and extensions to the path is not supported if the resource type is set.
* `unwrap` (`Boolean`): removes the host element
-
- <header data-sling-include="${resource}"
resourceType="'/apps/example/page/header'" unwrap="true"/>
-
# Sample
The [Sling Fling
Sample](http://svn.apache.org/repos/asf/sling/trunk/samples/fling/) is a sample
using Sling Scripting Thymeleaf with [Sling Models]({{ refs.models.path }}) and
[Sling Query]({{ refs.sling-query.path }}).