Reputation: 1
Heya I'm fairly new to Plone development. And I'm sitting with a problem.
I have a folder in Plone that contains products.
http://plonesite/products
What I would like to do, is to access the products directly when a call like this is made.
http://plonesite/products/4244-24
Preferably I want to mark the folder with a custom interface IE. IProductFolder. So whenever a user access:
http://plonesite/products
a script needs to be called and check whether there is a product number in the URL and perform a catalog search and redirect to the product. If the search doesn't return any results or the argument after /products/ is invalid it just continues to render the page.
I just don't know how to do this kind of setup. I've looked into adapters but they won't even work. Can anyone help me with a quick example?
Upvotes: 0
Views: 86
Reputation: 6048
collective.routes allows you to create URLs based on catalog data. Exactly what you're after. Don't be scared by the alpha status; the package works as documented.
Upvotes: 1