Hi all, I have been trying to find this out on my own but I´m affraid I will need your help (again). I have a folder called generic and a folder custom. like this portal_skins---- ¦--- custom ¦--- generic Well now I have the action box. And I added a action to create a new stylesheet_properties (in custom) called change colors. Now this action either links to the stylesheet_properties of generic and they will click a buton to copy the method to the custom folder. But the next time they log in they might want to change the colors (the stylesheet_properties) again. But if I send them to the generic folder again and the click the copy button they will get a error telling them the stylesheet_properties allready exists in the custom folder. So now my question: How can I make the link change depending on if there already exists a stylesheet_properties in custom (URL/custom/stylesheet_properties)and if not like them to the stylesheet_properties of generic(URL/generic/stylesheet_properties) Hope my explanation was clear. Thankz, James
James van der Veen writes:
.... So now my question: How can I make the link change depending on if there already exists a stylesheet_properties in custom (URL/custom/stylesheet_properties)and if not like them to the stylesheet_properties of generic(URL/generic/stylesheet_properties) The link goes to a Python script thats, whether "custom" has the "stylesheet_properties" already. If not, it creates it first. Then it modifies the object.
Checking is possible like this: try: style= context.custom['stylesheet_properties'] # it is already there except KeyError: # it is not yet there .... Dieter
participants (2)
-
Dieter Maurer -
James van der Veen