[Zope] Obtaining URL of Object w/Non-Var Name

Jeff Rush Jeff Rush" <jrush@timecastle.net
Fri, 29 Oct 99 12:19:30 -0500


Alright, what's the trick to be able to retrieve the URL of a Zope object
via DTML whose id has blanks or punctuation in it?  For example,
in a normally-named object called 'site_css', I'd do:

Ex. 1
    <LINK REL=stylesheet HREF=<dtml-var "site_css.absolute_url()"> TYPE="text/css">

But if the object is named 'site.css', I can use it w/o another layer/call or escape code.
I tried the following (and a lot of others) and the _[] expression is returning a string,
which then fails when it lacks a 'absolute_url' attribute:

Ex. 2
    <LINK REL=stylesheet HREF=<dtml-var "_['site.css'].absolute_url()"> TYPE="text/css"> 

Any solution must work with acquisition, as example one does, so I can keep
the stylesheet in the site root folder.

-Jeff Rush