Skip to content

Commit

Permalink
Merge pull request #3512 from plone/petschki-iconresolver
Browse files Browse the repository at this point in the history
Fix @@iconresolver resolving subpaths (eg. "contenttype/document")
  • Loading branch information
jensens authored Apr 27, 2022
2 parents 16ca65e + ccbf261 commit 19f845d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Products/CMFPlone/browser/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ class IconsView(BrowserView):

prefix = "plone.icon."
defaulticon = "++plone++icons/plone.svg"
name = ""

def publishTraverse(self, request, name):
self.name = name
if self.name:
# fix traversing to eg. "contenttype/document"
self.name += "/"
self.name += name
return self

def __call__(self):
Expand Down
2 changes: 2 additions & 0 deletions news/3500.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix `@@iconresolver` to resolve names with "/" correctly (eg. "contenttype/document")
[petschki]

0 comments on commit 19f845d

Please sign in to comment.