I assume you've started creating your own components?
If so, you can just create a "Border" component with a template like this:
[Border.html]
<html>
<body>
<ul>
<li>Menu item</li>
<li>Menu item</li>
<li>Menu item</li>
</ul>
<div jwcid="@RenderBody">
Page content will be inserted here
</div>
</body>
</html>
and then use that Border component in all your pages like this:
[Page.html]
<html jwcid="@Border">
<p>This will be inserted in the middle of your Border template, by that
RenderBody component.</p>
</html>
It's not quite the same as an include but it does the same job.
I think Kent mentioned this in his book.
--Martin
On Wed, 01 Feb 2006 02:18:40 +0100, Alin Simionoiu <[EMAIL PROTECTED]> wrote:
Hi folks,
I'm trying to build a small website that will exercise some business
logic. I looked around for some framework that will help me build the
pages fast.
I choose Tapestry mainly because I can use the existing HTML pages as
templates, really cool thing.
The first thing that I did was buying "Enjoy Web Development with
Tapestry" read the thing and start cranking the code.
After two days of cranking I end up having the first problem, although I
will have to say is more like a "what's the best practices for this".
My pages will have a header, a left side navigation panel and the main
page. The left navigation panel controls what page i'm displaying, I say
standard stuff.
My question is: how to I build the page Tapestry way?. I try at first to
use frames. The navigation panel has a logout link and boom first
problem. When I click on Logout I could not figure out how to go to main
page and not just refresh the frame. Seems that only the left frame is
loaded with the main page.
Checking the mailing list archive I read that people are recommending to
move away from frames. Ok let's move away from frames. And do what?
I was thinking about some sort of include, I will put the left panel in
a separate template and include it on all the other templates that needs
it (like php smarty include). Again check the mailing list, and nope
there's no include. There's RenderBlock but I'm not sure it is what i
need and really don't want to repeat the same html block in all the
pages, yak
How do people solve this kind of problem?. what's the recommended way?.
It seems to me that I would need to put the navigation panel in a
component. Is this the right way, component?.
Do I inject the panel html page into the main page using Block/
RenderBlock?
Cheers,
Alin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]