As I mentioned the other day I discovered (after thinking code changes
might be needed) that setting, for example, the body background colour
inside a webmacro template is quite simple:
$data.Page.Body.setBgColor("ffffff")
I hadn't realised, however, that there is a problem with this until I
was looking hard at the HTML source of the generated page for another
reason. The trouble is the ECS method setBgColor returns the body
element (to allow chaining of method calls). WebMacro sees this and
calls the toString method and renders the element. Thus I had spurious
<BODY></BODY> tags appearing in the generated HTML - which I didn't
notice because browsers seem to just chuck them away when parsing.
Anyway a workaround that works, although it's not very pretty is to say:
#set $junk = $data.Page.Body.setBgColor("ffffff")
Unless anyone can see a prettier way out of this?
--
Sean Legassick
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]