示例#1
0
def get_current_skin(self):
    ftool = self.getFormsTool()
    refferer = self.REQUEST.URL0.split('/')[-1]
    custom_forms = getattr(ftool, 'custom_forms', ())

    if isCustom(refferer, custom_forms):
        custom_skin = getattr(ftool, 'custom_skin', '')
        custom_skin_id = custom_skin.split('.')[0]
        return self._getOb(custom_skin_id)
    return self._getOb(self.getCurrentSkinId())
示例#2
0
def get_skin_files_path(self):
    ftool = self.getFormsTool()
    refferer = self.REQUEST.URL0.split('/')[-1]
    custom_forms = getattr(ftool, 'custom_forms', ())

    if isCustom(refferer, custom_forms):
        custom_skin = getattr(ftool, 'custom_skin', '')
        custom_skin_id, custom_schema = custom_skin.split('.')
        custom_skin = self._getOb(custom_skin_id)
        return '%s/%s' % (custom_skin.absolute_url(), custom_schema)
    return '%s/%s' % (self.get_current_skin().absolute_url(), self.getCurrentSkinSchemeId())