[ZPT] URLs and stuff

richard@bizarsoftware.com.au richard@bizarsoftware.com.au
Tue, 01 May 2001 09:01:05 +1000


Evan Simpson wrote:
> 
> From: "Chris Withers" <chrisw@nipltd.com>
> > <a href="/mysite/docs/page1">Go here</a>
> >
> > ...where mysite if a folder off the root of the ZODB that's served out
> as
> > http://www.mysite.com
> >
> > Now, what I'd like to have the above mean is:
> > "insert restrictedTraverse('/mysite/docs/page1').absolute_url()"
> 
> This could be <a tal:attributes="href
> root/mysite/docs/page1/absolute_url">, but if you meant that
> www.mysite.com is a different virtual host than the one making the
> request, this may not work.
> 
> > How could I make it apply to all links (maybe fo a given class) in a
> template?
> 
> That's not possible in ZPT yet.

Back to a very old idea I punted when I was muttering about URL munging
under the title "playing with stylesheets in ZPT?"(*):

<body tal:process="here/munge_urls">
</body>

Where munge_urls would be passed the parsed content of the tag. It should
then be able to add/remove/modify tags/attributes as needed.

I note though that both myself and Chris want to be able to do pretty much
the same thing - take URLs that work when the designer is in Dreamweaver
and make them look like what they're supposed to in Zope. I think that as
ZPT gets used more, this is going to become much more requested. Another
big one is the ability to replace a <link> to a stylesheet with a <style>
tag. The linked stylesheet is significantly easier to work with in
Dreamweaver, but linked stylesheets simply don't work sanely in Netscape
(and IE sometimes).


    Richard

* the mail archive is broken just before this thread, which started on the
9th of April :(

-- 
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)