Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalTheme::PortalTheme::editPortalImage (   self,

Edit a Portal Image.

Definition at line 778 of file PortalTheme.py.

00778                                    :
        Edit a Portal Image.

        file = kw.get('file', None)
        if file is None:
            return None

        imagecat = kw.get('imagecat', '')
        if imagecat not in self.cpsskins_listImageCategories():
            return None

        # rebuild the theme to create the image folders.
        if imagecat not in self.objectIds():

        images_dir = getattr(self, imagecat, None)
        if images_dir is None:
            return None

        id = kw.get('id', None)
        if id is None:
            return None

        img = getattr(images_dir, id, None)
        if img is None:
            return None
        # create a thumbnail
        if imagecat == 'thumbnails':
            file = self._createThumbnail(file)


        # clear the portlet's cache
        ptltool = getToolByName(self, 'portal_cpsportlets', None)
        if ptltool is not None:

        return img

    # RAM Cache

Generated by  Doxygen 1.6.0   Back to index