Last change
on this file was
1,
checked in by myroslav, 18 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
608 bytes
|
Rev | Line | |
---|
[1] | 1 | from Products.CMFCore.utils import getToolByName |
---|
| 2 | from Products.ResourceRegistries.browser.styles import StylesView as base |
---|
| 3 | |
---|
| 4 | class StylesView(base): |
---|
| 5 | """ Information for style rendering. """ |
---|
| 6 | |
---|
| 7 | def styles(self): |
---|
| 8 | styles = super(StylesView, self).styles() |
---|
| 9 | portal_url = getToolByName(self.context, 'portal_url') |
---|
| 10 | new_url = portal_url() |
---|
| 11 | portal_url = portal_url.getPortalObject().absolute_url() |
---|
| 12 | for style in styles: |
---|
| 13 | src = style.get('src', '') |
---|
| 14 | if src != '': |
---|
| 15 | style['src'] = src.replace(portal_url, new_url, 1) |
---|
| 16 | return styles |
---|
Note: See
TracBrowser
for help on using the repository browser.