Hello!
There is something I don't like about WebMacroSiteLayout. It uses ECS to generate
<head> part of the page. There is WebMacroPageAttributes that allows manipulation
of it's content, but I think it may not be the best solution possible.
The disvantage of this approach is that layout template is not valid html because
is't obviously missing the <head> part. This forces the web developer that is
perparing the template to use WM 'incatations' to set such basic things as body
bgcolor attribute and disallows him to test his layout right away in the browser.
I'd much better like to have a layout template like that
<html>
<head>
<titile>$data.getTitle()</title>
<link rel="/_style/style.css" type="text/css">
#foreach $item in $meta #begin
<meta name="$item.name" content="$item.content">
#end
<script lanuage="JavaScript">
function whatever() {
}
</script>
</head>
<body bgcolor="#41A382">
$screen_holder
</body>
</html>
where 'meta' is a vector of hashtables contiaing keys 'name' and 'content'
that allows your screen to generate meta information dynamically and
allows your html author to manipulate styles and other stuff he cares about
wiht minimal hassle.
To make this work, layout class should use the same WebContext instance as
the Screen and Action (currently WebMacroSiteLayout creates a fresh instance,
for some reason) and use data.getOut() instead data.getPage() to write
template rendering result to the browser.
I'm not sure if this is "the right thing" - maybe the current approach has
some advantages I'm not aware of, still I think that such calss should be
available as an alternative. I'm not sure how should this class be called,
WebMacroSitePureLayout, WebMacroSiteNoECSLayout?
Thoughts?
Rafal
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]