I have added an IsFeatured field to the Links DB, which can take the value of "Yes" or "No". What I want to do is insert a heading after "Related Categories" and before "Links" for all applicable "Featured Links" and then list the applicable links.
So far I have the following in the Category.html template. Of course, the "Featured Links" heading comes up even when there are no featured links, because I haven't been able to figure out a way to only display that heading if there are featured links within the category.
Can anyone help?
Thanks!
<%if links_loop.length~%>
<h3>Featured Links</h3>
<%loop links_loop~%>
<%if isFeatured eq 'Yes'%>
<%include link.html%>
<%endif%>
<%~endloop%>
<h3>Links</h3>
<%if paging.num_hits%><div class="paging"><%Links::Utils::paging()%></div><%endif%>
<%loop links_loop~%>
<%include link.html%>
<%~endloop%>
So far I have the following in the Category.html template. Of course, the "Featured Links" heading comes up even when there are no featured links, because I haven't been able to figure out a way to only display that heading if there are featured links within the category.
Can anyone help?
Thanks!
<%if links_loop.length~%>
<h3>Featured Links</h3>
<%loop links_loop~%>
<%if isFeatured eq 'Yes'%>
<%include link.html%>
<%endif%>
<%~endloop%>
<h3>Links</h3>
<%if paging.num_hits%><div class="paging"><%Links::Utils::paging()%></div><%endif%>
<%loop links_loop~%>
<%include link.html%>
<%~endloop%>