XModPro

Hide Feed if Empty

 Graham Graham posted Aug 25, 2015
Active Sep 9 · Viewed 1780 times

I'm calling several feeds from my template, and writing the information into Bootstrap modals. However I'm trying to hide a feed if the results are empty.

However whenever I put a ifnotempty around the title in the header then I get nothing, even if there are records.

Any ideas?

john

<xmod:Feed ContentType="text/html" FileName="facStaffBioPublications">

<ListDataSource CommandText="SELECT idPublications , pubDate , pubDes, pubImage , adName FROM dbo. ecXmodFacStaffPublications WHERE ( adName = @adName )" >

<parameter name="adName" value='[[Url:adName]]' datatype="string" ></parameter>

</ListDataSource>

<HeaderTemplate>

<xmod:ifnotempty value='adname'>

<h2>Publications</h2>

</xmod:ifnotempty>

</HeaderTemplate>

<ItemTemplate>

<div>[[pubDes]]</div>

</ItemTemplate>

<FooterTemplate></FooterTemplate>

</xmod:Feed>

8 Replies

Loading replies...