[ZPT] How do I...
Tony McDonald
tony.mcdonald@ncl.ac.uk
Thu, 17 May 2001 08:38:25 +0100
On 17/5/01 8:25 am, "richard@bizarsoftware.com.au"
<richard@bizarsoftware.com.au> wrote:
Wow! what a speedy response! - thanks Richard
[snip]
>> What I'd like to do is have bogus0 = blue and bogus1 = red (or whatever).
>> What's the preferred way of doing this?
>
> The best way would be to use a stylesheet. Embed something like this at the
> top of the page:
>
> <style type="text/css">
> .bogus0 {
> background-color: #00ff00;
> border: none;
> }
>
> .bogus1 {
> background-color: #ff0000;
> border: none;
> }
> </style>
>
> And use '<tr tal:attributes="class string:bogus${repeat/item/odd}" ...'
>
Ah, I see the point. It's my 'old school' HTML coding coming out there.
>
>> 2) I'd also like to call the above PageTemplate from DTML, substituting the
>> module_code='bgm' above with module_code=modcode, and pass modcode into the
>> PageTemplate. I'm using this code;
>>
>> tal:repeat="item python:container.module_info(module_code=request/modcode)"
>>
>> Unfortunately the standard idiom
>>
>> <dtml-var "mod_info(_.None,_,modcode='bgm')">
>>
>> Returns an error:
>> Error Type: TALESError
>> Error Value: exceptions.NameError on modcode in ""
>
> You'd be wanting to use "module_code=options/modcode" in the TAL.
>
Just tried that, and still get the
<strong>Error Type: TALESError</strong><br>
<strong>Error Value: exceptions.NameError on modcode in "<PythonExpr
container.module_info(module_code=options/modcode)>"</strong><br>
error.
I've also tried passing the variable in from the browser window, ie
mod_info?modcode=bgm
And get the same response.
I'm baffled :(
Tone
--
Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope