Closed iham closed 3 years ago
@iham obsolete with icon resolver in plone 6?
@agitator not sure, didn't take a look at plone 6 and how it deals with inlining svg images
Functionality in https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/browser/icons.py
Usage <tal:icon tal:replace="structure python:icons.tag('archive', tag_class='custom-class', tag_alt='foobar')" />
@agitator sort of ... i guess.
this looks like a manual method you could call on an object inside a template or something else.
my approach was to replace img tags with ref to a svg file into svg-markup.
by calling that icons-view via a transform, maybe the same goal is achieved.
Moved issue to cmfplone
it would be nice to see img-tags, that src refers to a .svg file, to be replaced by the svg's content. plus add the alt and title as meta-data to the svg
my approach was to write an adapter: configure.zcml
and the transform itself: transform.py
feel free to use this approach.