There are probably numerous ways to do that depending on what style of
framework you prefer.  If you want to use simple esp scripts (jsp would be
similar), you can delegate rendering to another script by using the
sling.include(..) techniques,

For example, the usermanager-ui sample (see [1]) has a common page template
script (see [2]).  All the other pages that want to use the same page
shell (i.e [3]) set some request attributes to pass parameters and then
delegate to the common page script to assemble the response output.

1. http://svn.apache.org/viewvc/sling/trunk/samples/usermanager-ui/
2.
http://svn.apache.org/viewvc/sling/trunk/samples/usermanager-ui/src/main/resources/libs/sling/usermgmt/page.html.esp?view=markup
3.
http://svn.apache.org/viewvc/sling/trunk/samples/usermanager-ui/src/main/resources/libs/sling/user/html.esp?view=markup

Regards,
Eric

On Fri, Sep 7, 2012 at 6:50 PM, Günther Schmidt <[email protected]>wrote:

> Hi,
>
> I'm just giving Sling another try, as a cms, since I don't want to use
> wordpress, joomla or any of the others.
> Getting the hang of sling is gonna cost me some time in any case but
> there's one thing I'm wondering about upfront:
>
> Does sling allow to build basic templates, so that I do not need to write
> the main, ie. outer html every time?
>
> I'd just like to have one single outer html file for let's say a list and
> a detail view.
>
> Günther
>

Reply via email to