Closed (works as designed)
Project:
Icon API
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2014 at 20:28 UTC
Updated:
13 Jan 2014 at 18:26 UTC
Jump to comment: Most recent
Comments
Comment #1
markhalliwellYou shouldn't have to manually add the "necessary classes". You should be inserting the icon via
theme(), not throwing away the result.Yes, there is a better way to do this. The Icon API is designed is to automatically include the CSS only when it's required, ie: via template_preprocess_icon().
I'm guessing here, but it sounds like this is what you're doing?
You should instead inject the entire icon markup, probably via
#prefixor#suffixor even as it's own markup element:Comment #2
dustin@pi commentedPerfect. Thanks Mark!
The
$form['#prefix'] = theme ...is what I should have been doing (at least for my particular case).