Hello, I have this site hiearchy, make it by Folders: - product - books - tapes Now, if somebody write to URL address like: http://mysite.com/product/books I get a template page from that folder. It's OK. But what I need is some dynamical handling of URL. I would like be able to handle URLs like: http://mysite.com/product/books/tarzan where tarzan is some key word for, which I get, dynamical query database (for example) and dynamical render page about Tarzan book. I dont want make folder hiearchy under "books" folder, because I have all books data in database... Is it possible do something like this? Thanks Michal
Have you looked at ZCatalog? Jonathan ----- Original Message ----- From: "michal" <michal@plovarna.cz> To: <zope@zope.org> Sent: February 7, 2005 3:49 PM Subject: [Zope] "Fake" folder hiearchy
Hello, I have this site hiearchy, make it by Folders:
- product - books - tapes
Now, if somebody write to URL address like:
http://mysite.com/product/books
I get a template page from that folder. It's OK.
But what I need is some dynamical handling of URL. I would like be able to handle URLs like:
http://mysite.com/product/books/tarzan
where tarzan is some key word for, which I get, dynamical query database (for example) and dynamical render page about Tarzan book. I dont want make folder hiearchy under "books" folder, because I have all books data in database...
Is it possible do something like this?
Thanks Michal
_______________________________________________ Zope maillist - Zope@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 )
michal wrote:
Hello, I have this site hiearchy, make it by Folders:
- product - books - tapes
Now, if somebody write to URL address like:
http://mysite.com/product/books
I get a template page from that folder. It's OK.
But what I need is some dynamical handling of URL. I would like be able to handle URLs like:
http://mysite.com/product/books/tarzan
where tarzan is some key word for, which I get, dynamical query database (for example) and dynamical render page about Tarzan book. I dont want make folder hiearchy under "books" folder, because I have all books data in database...
Is it possible do something like this?
Certainly. Look for traversal_subpath (Python scripts), simple result traversal/pluggable brains (ZSQL methods), and __bobo_traverse__ (Products). One link I found quickly: http://zope.org/Members/teyc/Wiki/BoboTraverse --jcc
michal wrote:
But what I need is some dynamical handling of URL. I would like be able to handle URLs like:
jcc wrote:
Certainly. Look for traversal_subpath (Python scripts), simple result traversal/pluggable brains (ZSQL methods), and __bobo_traverse__ (Products).
traverse_subpath is also available in ZPT, and ot cover michal's example, I'd have a page template called 'books' starting with something like: <html tal:define="book_id python:traverse_subpath and traverse_subpath[0] or None"> cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Chris Withers -
J Cameron Cooper -
Jonathan Hobbs -
michal