Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys
I want to take Icon from Icontent Object. I could take it from Document object. How to get icon through api.
Thanks
Rahim
Hey!
This will get you the CSS-class for the icon:
int nodeId = 1337; IContent content = ApplicationContext.Current.Services.ContentService.GetById(nodeId); string icon = content.ContentType.Icon;
But it won't show the icon on the front-end unless you are using the same CSS as in the back-end.
/Nikola
Hi Nikola,
Its working.. Thanks for your reply.
How would you get this in Razor. I have tried adding the relvent @using and the above and variations of and not able to get it to work.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get Content Icon from ICONTENT variable
Hi guys
I want to take Icon from Icontent Object. I could take it from Document object. How to get icon through api.
Thanks
Rahim
Hey!
This will get you the CSS-class for the icon:
But it won't show the icon on the front-end unless you are using the same CSS as in the back-end.
/Nikola
Hi Nikola,
Its working.. Thanks for your reply.
Rahim
How would you get this in Razor. I have tried adding the relvent @using and the above and variations of and not able to get it to work.
is working on a reply...