If-Statement in Widget Templates
I have added some custom fields to the news content and would like to display this data if it has a value. Is there a way to do an if statement in the widget templates?
Thanks,
Alex Lorenz
Hi Alex,
Thank you for contacting Telerik Support.
Once you create a custom field, you can define its type, where to be seen, etc. Lets say that you create a custom text field called MyCustomField. Once this field is created and I go to edit the widget template for single news items I will have the ability to add this field to my template, refer to attached image. This will add a field control for my custom field. If this field is not set the field control will not display anything.
Kind regards,
Radoslav Georgiev
the Telerik team