[Zope3-Users] Re: Getting URL?para=val in view class
j.kartnaller
j.kartnaller at robotech.at
Mon Dec 6 02:55:43 EST 2004
Florian Lindner wrote:
> jürgen Kartnaller schrieb:
>
>> 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)
>
>
> And this function return a list of members.
>
> So you use in your template:
>
> <li tal:repeat="member view/selectMembers">
> <span tal:replace="member/name" />
> </li>
>
> Correct?
yep
>
> Florian
More information about the Zope3-users
mailing list