In my sling repository I've defined a /apps/foo/bar/html.esp which
decorates all my web pages with the standard layout used through out the
site.
Eg.
<html>
<head>
<title><%= currentNode.title %></title>
<!-- css imports, favicon etc. -->
</head>
<body>
<h1><%= currentNode.title %></h1>
<%=currentNode.text %>
<!-- html code for footer with copyright notice, etc -->
</body>
</html>
Now when any node with sling:resourceType=/foo/bar is accessed it is
automatically decorated with the website's standard layout. This is
awesome and I would like to be able to use the above html.esp to
decorate even error pages like 404. For example, I would like to be able
to create a node with a title property of "Page Not Found" and a text
property like "<p>Sorry the page you were looking for was not
found</p>", and have Sling render 404 error pages using that node and
the /apps/foo/bar/html.esp script. Is this possible with Sling?
I'm aware that I can create a /apps/sling/servlet/errorhandler/404.esp
file but that doesn't allow me to use the /apps/foo/bar/html.esp decorator.
/Scott