Image Gallery - No Images
Is there a simple way in the template to show a "no images" sign if your custom module has no images for that entry?
Hello David,
What I can suggest is that you use the conditional control in the markup of your template and render data depending on a condition. The "If" attribute should contain a boolean value. Here is an example of how you can check if there are related items and if yes to render the related items and if there are no related items to render the desired text:
<
sf:Conditional
If='<%# ((int)Eval("RelatedFieldName.Count")) != 0 %>' runat="server">
<
Then
>
<
h2
>Here are the related images</
h2
>
<
asp:Repeater
runat
=
"server"
DataSource='<%# Eval("RelatedFieldName") %>'>
<
ItemTemplate
>
<%-- here goes your custom logic for displaying the data for the related items --%>
</
ItemTemplate
>
</
asp:Repeater
>
</
Then
>
<
Else
>
<
h2
>There are no related images for this item.</
h2
>
</
Else
>
</
sf:Conditional
>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
Thanks Sabrie,
Exactly the tool I needed.