Hi,
one more question: any plan to parameters for components? Here's
exactly what I mean:
base.html
==================================
<html>
<head>
<title>[+ $param{title} +]</title>
</head>
<body bgcolor=[+ $param{bgcolor} +]>
<h1>[+ $param{title} +]</h1>
[- Execute ('*') -]
</body>
</html>
test.html
==================================
[- title => "Test1", bgcolor => "pink" -]
<p>This is test 1
There could be even way to specify defaults in base.html, maybe
[.- %default_params = ( title => "Test1", bgcolor => "pink" ) -]
I think the new version of Mason does it that way.
- Robert
P.S. When I read about first EmbperlObject, I jumped two meters, because
it's exactly what I need. Well, it doesn't work offline, but isn't very
urgent and I may find the courage to patch it myself eventually. But
parameters for components are quite necessary for all other my projects,
without them, I'd still have to start every file with
[- Execute ..., import => 1 -]
[- pagehead title => "Test1", bgcolor => "pink" -]
...
[- pagefoot copyright => "off" -]
etc, you've got the idea. Comments, anybody? Am I just missusing Embperl
big way?
P.S. Isn't it slowly becoming more like EmbperlTemplate? ;-)
one more question: any plan to parameters for components? Here's
exactly what I mean:
base.html
==================================
<html>
<head>
<title>[+ $param{title} +]</title>
</head>
<body bgcolor=[+ $param{bgcolor} +]>
<h1>[+ $param{title} +]</h1>
[- Execute ('*') -]
</body>
</html>
test.html
==================================
[- title => "Test1", bgcolor => "pink" -]
<p>This is test 1
There could be even way to specify defaults in base.html, maybe
[.- %default_params = ( title => "Test1", bgcolor => "pink" ) -]
I think the new version of Mason does it that way.
- Robert
P.S. When I read about first EmbperlObject, I jumped two meters, because
it's exactly what I need. Well, it doesn't work offline, but isn't very
urgent and I may find the courage to patch it myself eventually. But
parameters for components are quite necessary for all other my projects,
without them, I'd still have to start every file with
[- Execute ..., import => 1 -]
[- pagehead title => "Test1", bgcolor => "pink" -]
...
[- pagefoot copyright => "off" -]
etc, you've got the idea. Comments, anybody? Am I just missusing Embperl
big way?
P.S. Isn't it slowly becoming more like EmbperlTemplate? ;-)