If-Statement in Widget Templates

Posted by Community Admin on 03-Aug-2018 20:49

If-Statement in Widget Templates

All Replies

Posted by Community Admin on 08-Feb-2011 00:00

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

Posted by Community Admin on 11-Feb-2011 00:00

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

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed