[Zope3-Users] Re: Getting URL?para=val in view class

jürgen Kartnaller j.kartnaller at cable.vol.at
Sun Dec 5 14:35:11 EST 2004


Florian Lindner wrote:
> Hello,
> I have a number of slightly different views for a class. All are almost 
> the same and repreent a folder listing. One view are all object with the 
> objects where owner==logged in user, another view are all objects on 
> which the logged user has a certain permission.
> Instead of different view a planned to use on template with a view class 
> and access the view with view.html?view=MyObjects or 
> view.html?view=AssigendObjects. The view class get this parameter and 
> generates a list with the objects. The template renders this list.
> 
> My questions:
> How would you do that? What is the Zope way?
> And how to get the ?view parameter in the view class?

I did exactly the same for a memberlist :

In my view class I have a method 'selectMembers'.
I call my view from a form with all the necessary parameters.

In the 'selectMembers' method I get the parameters from the request like
filterNames=self.request.get('filterNames',None)

Jürgen



More information about the Zope3-users mailing list