[ZPT] CSS relativity

Isaac Levy ike@visuallistening.com
Mon, 25 Feb 2002 03:28:57 -0500


Hello all,

I'm trying to do something I don't know can be accomplished with Page 
Templates, and it's making me batty trying to figure it out.  Any help 
or suggestions would be most appreciated!:

Here's what I'm doing-
I'm trying to get a class attribute to change based on the relationship 
between 2 kosher (functioning) TAL variables,

1) the return of folder values, [to be used as links, etc...] from a 
python script

2) the navigation is based on folder titles, making up the URL strings, 
and I'm looking to feed back a different stylesheet class based on 
weather or not the link (navigation path) is in the REQUEST/URL.

i.e.-

------
##primary_nav_py is a tiny python script that feeds me folder location 
variables:

return container.objectValues(['Folder'])#

--
OK the TAL-
                 <span tal:repeat="item container/topics/primary_nav_py"
                       tal:define="nav ##the thing I describe below##"
                       class="nav"
                       tal:attributes="class nav">
                 <a href="item/absolute_url"
                       tal:attributes="href item/absolute_url"
                       tal:content="item/title"
                       class="##NAVTHING##" >repeated link
                 </a><br>
                 </span>
--
##NAVTHING is where I'm trying to do something like:
if
the [request/url] contains [item/title] return 'nav'
elseif
the [request/url] contains [request/here] return 'herenav'
else
return 'subnav'
------

Is there a way I can put this in via TAL, or is there some other method 
I should investigate?

Thanks in advance for any advice!!!!!

Best,
Isaac
--
www.visuallistening.com