[Erp5-dev] How to call view() on arbitraly chosen portal skin?

bartek bartek at erp5.pl
Tue Oct 2 16:17:46 CEST 2007


Jacek Medrzycki wrote:
> Hi
> 
> When I call object.view(), i get rendered form for the view action of 
> the object.
> 
> But I want it to be rendered not with the default View skin selection, 
> but on specified one. That is, I want to simulate the call:
> /some/object/path/view?portal_skin=SkinName
> but from the code of Zope product.
> I tried:
> object.view(portal_skin='SkinName')
> but it doesn't work.
> 
> How can I do this?

If you want it work exactly this way, use skin layers - by default, 
there are View, Print and CSS skin. You can add your own, the tricky 
part of it was discussed on this list about a month ago.

But maybe a better solution would be to define additional action on 
portal type, with a condition, and give it a priority lower then 1.0, so 
that it is checked and possibly called before the default View action.

Bartek

> 
> Regards
> Jacek
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://mail.nexedi.com/mailman/listinfo/erp5-dev
> 


-- 
"feelings affect productivity. (...) unhappy people write worse 
software, and less of it."
Karl Fogel, "Producing Open Source Software"



More information about the Erp5-dev mailing list