I really like the look of this package, but am having an issue getting the icons to render correctly.
I'm using v1.6.0 of Iconic with Font Awesome Pro 5; I've set it up as per Chris Robinson's excellent guide here
The Icons are displaying in the backend for selection as expected:
However, when I come to render the property, the property I'm getting back is of type JToken and contains the following JSON:
{{ "icon": "fa-book",\r\n "packageId": "6dfd0a73-376d-498f-9065-76d0a3390738" }}
Obviously rendering this just gives me the JSON as that's all that's in there, and I can't even parse the JSON to get the correct data as there's no sign of the fab/fas/fal prefix that's needed.
I'm not sure if this is some mistake in my configuration or an issue with my setup - I'm using the ModelsBuilder with the models in a separate "core" project, where I've also installed Iconic, but nothing I do seems to make any difference to the value that comes back.
This is how my package is set up for the solid icons, using the rules that Chris provided on Git:
I eventually figured this out, more or less by accident - I had installed Umbraco against .NET 4.5.2 originally, but 1.6.0 is built against a later version I think (there was a warning about this in the package manager console in Visual Studio).
I updated my projects to use .NET 4.7.2 and re-installed the package, and (after some rather frustrating issues with System.Net.Http references) I'm now getting the HTML strings correctly instead of the JTokens.
Returning JSON instead of IHtmlString?
Hi there :)
I really like the look of this package, but am having an issue getting the icons to render correctly.
I'm using v1.6.0 of Iconic with Font Awesome Pro 5; I've set it up as per Chris Robinson's excellent guide here
The Icons are displaying in the backend for selection as expected:
However, when I come to render the property, the property I'm getting back is of type JToken and contains the following JSON: {{ "icon": "fa-book",\r\n "packageId": "6dfd0a73-376d-498f-9065-76d0a3390738" }}
Obviously rendering this just gives me the JSON as that's all that's in there, and I can't even parse the JSON to get the correct data as there's no sign of the fab/fas/fal prefix that's needed.
I'm not sure if this is some mistake in my configuration or an issue with my setup - I'm using the ModelsBuilder with the models in a separate "core" project, where I've also installed Iconic, but nothing I do seems to make any difference to the value that comes back.
This is how my package is set up for the solid icons, using the rules that Chris provided on Git:
Any suggestions/help gratefully received....!
I eventually figured this out, more or less by accident - I had installed Umbraco against .NET 4.5.2 originally, but 1.6.0 is built against a later version I think (there was a warning about this in the package manager console in Visual Studio).
I updated my projects to use .NET 4.7.2 and re-installed the package, and (after some rather frustrating issues with System.Net.Http references) I'm now getting the HTML strings correctly instead of the JTokens.
is working on a reply...