You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Joshua Oransky <ca...@gmail.com> on 2008/09/17 22:28:27 UTC
How do I create an overall visual style for my templates?
I need to have a common look around the edges of my sling
templates... Things like a nav, background, footer, etc... In fact,
the only thing that changes is the middle div... how is the best way
to set up these files?
I would think that a global layout.jst would be defined, and in it a
general 'include content.jst" but how can I tell it to use the
content.jst of my current resourceType?
Or am I totally missing how to set this up?
-Josh
Re: How do I create an overall visual style for my templates?
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Josh,
By employing the resource type hierarchy mechanism you can easily do
this: Define a "core" resource type - say sample/base - and define your
main scripts there. Then you extend from this resource type to define
the content scripts.
For example define a sample/album resource type with the sample/base as
its super resource type, just set the sling:superResourceType property
of the /apps/sample/album node to sample/base and you are done.
This should help.
Regards
Felix
Joshua Oransky schrieb:
> I need to have a common look around the edges of my sling
> templates... Things like a nav, background, footer, etc... In fact, the
> only thing that changes is the middle div... how is the best way to set
> up these files?
>
> I would think that a global layout.jst would be defined, and in it a
> general 'include content.jst" but how can I tell it to use the
> content.jst of my current resourceType?
>
> Or am I totally missing how to set this up?
>
> -Josh
>