I was using SVG code in metabox text field because I didn’t want to add http request for each SVG file, but your code renders SVG inline, awesome!
And glad to discover file_get_contents function
(By the way I don’t understand your $icnID arg, which doesn’t seem to match documentation… I only use url param and it is working perfectly without any warning.)
And yes, you’re right, more a feature request, but as dynamic data is available for bitmap images, I consider this a defect. Anyway, EDITED.
I use jet engine, and today I got acquainted with such a thing as repeaters and this is exactly what I would like to use on my sites because it gives me the flexibility that I would like, but the problem is that for elements that I want to create for example: a list of price packages or cards advantages, I want to add an icon and connect a dynamic field, so as not to do it manually.
Please add dynamic data for widgets Icon and SVG.
Since we have an SVG element it makes sense for it to support dynamic data so we can use it in queries and load the SVG inline with the HTML to allow for styling of the svg.
There won’t be many votes; most simply don’t understand how this can simplify the creation of website blocks using repeaters. About 80% of brick users faint when they hear about custom code! And if you tell them about user fields and repeaters, I’m afraid there may be more dire situations here. This innovation should ignore the vote and be added just like a number of functions that appeared in Bricks and not only were no one voted for them, they were not even on the roadmap.
Guys no need to worry about the votes. There will be dynamic data in code element. I think you could use that in these scenarios once it will be implemented
In the Bricks Facebook group, every week, you will find a post about this. Which confirms that those who know how to work with dynamic data really need this option, while amateurs don’t even understand how to use what they already have by asking the simplest questions.