I have a grid template that displays a list of online services and links to both the URL of the online service and, optionally, a landing page that describes the service in more detail. I'd like to display a glyphicon for the online services that have a landing page, but not display anything for the ones that don't have a landing page, similar to the Overview column at
https://portal.ehawaii.gov/home/online-services/#o...
.
I've used the following for ASP.NET GridView objects:
<ItemTemplate>
<asp:HyperLink ID="linkInfoPage" runat="server" NavigateUrl='<%# Bind("InfoLink") %>'
Visible='<%# Eval("InfoLink").ToString().Length.Equals(0) ? false : true %>' >
<spanclass="glyphicon glyphicon-folder-open"></span>
</asp:HyperLink>
</ItemTemplate>
I can put the following into my XMod template to not display the glyphicon, so how can I get it to display or not display based on whether the [[InfoLink]] field is empty or not:
<td><a href='[[InfoLink]]'><span class="glyphicons glyph-circle-info" style="display:none"></span></a></td>