[Zope] Looping URL's

Cliff Ford Cliff.Ford at ed.ac.uk
Tue Oct 12 15:20:00 EDT 2004


Better recommendation? Who knows? This is different:

I put a folder menu in a DTML document in a format suitable for passing 
to a python script. The menu document looks like this:

<dtml-var expr="MenuGen([
['index_html', 'Home'],
['people/', 'People'],
])">

The python script (MenuGen) gets the url and makes it absolute:

theURL = context[url].absolute_url()

I have a form to edit the menu document so that users can't get the 
format wrong. The form only allows links to its immediate child 
templates and folders.

If someone puts in a dud link in the body of a page, for example from 
people/index_html to people/teachers/ where teachers does not have an 
index_html document, I guess I would have your problem. So I have a 
folder generation mechsnism that makes it easy for users to fill out a 
form to get a fully functional folder.

My experience is that training won't work!

Cliff

Edward Pollard wrote:
> We've been having a continual problem using Zope to serve as a 
> campus-wide CMS. Non technical people are plaguing the server with 
> malformed references, creating looping URLs that cause our search engine 
> to fall over dead. I presume you all know what I'm talking about... the 
> a/b/a/b/a/b URL's.
> 
> We've focused on user-training, but we really need to find a way to make 
> the server more bulletproof. I'm considering throwing a call into the 
> template that compares the request URL with the absolute_url and 
> redirects/logs when a discrepancy is found.
> 
> Does anyone have any comment on this approach, or a better recommendation?
> 
> ---
> Edward J. Pollard, B.Sc
> Webmaster, University of Lethbridge
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )


More information about the Zope mailing list