The commented out lines are the working example for the silk refresh icon. I tried inspecting the element in a different part of the page to find out what class I’d need for tableCellDiv in the declaration, but didn’t find anything useful. looking to replace ‘fa’ which is not the correct class. I also tried ‘sk-webicon’ and ‘sk-webicon-font-awesome’…
I think there is a more straightforward way of doing this. You can add a template to the table and show the icon by calling its class name in a span. Something like this:
Then you can add conditional a conditional wrapper so that it only shows when a certain value is true. Here is the syntax that will show the icon only when “FieldValue” is truthy.
{{#FieldValue}}{{countId}} {{/FieldValue}}
If you want to get more complicated with your evaluation, add a UI Only formula field that results in a Boolean. “If Ammount > 100, True, False.”
And finally if you want to get really complicated build a Case statement in the UI Only formula field. The result of each case should be the icon name. “sk-icon-add, sk-icon-error…” Then merge that UI Only formula field in your template code like this:
Having sk-icon in there causes it to give me the green checkbox instead of the refresh icon regardless of whether ‘fa-refresh’ is included or not.
{{#Autopublishing}}{{/Autopublishing}}
omitting the sk-icon gives me an image, but it’s not the icon I expect
the row starts with the font awesome icon I want, the skuid example is the green one, the next thing is what that template gives me
Bill, thanks for the suggestion. I’m still missing something though. Both what you provided and what Rob provided work. I get an icon. What I need though is not a silk or standard icon, but the one from the font awesome icon set.
Try adding a row action and pick the icon you want to display in the Template field. Preview the page then ‘right-click’ on the icon and inspect the element. It looks like the way you reference some of the other icon sets is different.
This HTML will show the ‘scales of justice’. The sizing is off, however.
I was able to add the HTML into a template field on table. I am using Skuid 11.1.1 with the default theme on the page. Here is a sample page.
Thanks,
Bill
{{Model.labelPlural}}
Home
Template Field
<svg viewBox="0 0 24 24"><use xlink:href="/resource/skuid__IconsSVG/font-awesome/font-awesome.min.svg#balance-scale"></use></svg>