More in this section

Forums / General Discussions / If-Statement in Widget Templates

If-Statement in Widget Templates

2 posts, 0 answered
  1. Alex
    Alex avatar
    39 posts
    19 Jul 2010
    08 Feb 2011
    Link to this post
    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?

    Alex Lorenz
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    11 Feb 2011
    Link to this post
    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
2 posts, 0 answered