Hi

This is what templating is all about. You create one base layout that all you 
pages are based on. It will normally be divided into several reusabloe 
sections, such as footer, jheader, menu and contents (as in your scenario).

Now when you create new pages, the only thing you want to create is the stuff 
that changes (normally the content) and not have to create a complete page with 
every thing on it each time.

You do not need the start.thml, only the startBody.html

The what you do is in clay-views-config (assuming you have followed the 
standard) you define:

<component jsfid="/start.html" extends basePage>
        <symbols>
            <set name="@title" value="Application Home" />
            <set name="@bodycontent" value="/startBody.html" />
        </symbols>
</component>

As you can see this is very close to what you did. (There is a catch here: You 
need to add .html as something that JSF is supposed to handle in the web.xml 
file)

I have written a getting started tutorial that you can look at:

http://wiki.apache.org/shale/ShaleAndClayTutorial


Hopefully later to day I'll add another tutorial that goes into basic component 
creation.

Hermod



-----Original Message-----
From: Bernhard Slominski [mailto:[EMAIL PROTECTED]
Sent: Monday, February 26, 2007 12:15 PM
To: '[email protected]'
Subject: Clay templating


Hi all,

I use Clay to build my pages with templates.

I have a base page, all my actual pages are derived from the base page.
My clay-config.xml looks like this

    <component jsfid="basePage" extends="clay">
        <attributes>
            <set name="clayJsfid" value="/templates/layout.html" />
        </attributes>
        <symbols>
            <set name="@title" value="Default Title" />
            <set name="@headercontent" value="/templates/header.html" />
            <set name="@bodycontent" value="space" />
            <set name="@footercontent" value="/templates/footer.html" />
        </symbols>
    </component>

    <component jsfid="startPage" extends="basePage">
        <symbols>
            <set name="@title" value="Application Home" />
            <set name="@bodycontent" value="/startBody.html" />
        </symbols>
    </component>

The "problem" is my actual page start.html it looks like this:

<span jsfid="startPage"/>

So the issue I'm having is that for every page I need two files
start.html
startBody.html

The start.html page only calls the "startPage" clay component.
So I'd like to have only one file which contains my body.
Are there any possibilties to do this?

Thanks

Bernhard


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to