Hi
I have a CMSRepeater as follows
<cms:CMSRepeater ID="rptKeywordSearch" runat="server" ClassNames="cms.MenuItem" Path="/%"
TransformationName="cms.MenuItem.SimpleList" MaxRelativeLevel="3" ZeroRowsText="">
<HeaderTemplate>
<ul class="keywordSearch">
</HeaderTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</cms:CMSRepeater>
In the transformation I am trying to read a value from the QueryString, I want to pass this into the new function I have which reads in the 'Keywords' field (csv'd values) and a search term.
The function reads the keywords field, splits out the string into an array and does a boolean check to see if the search term exists within the array, returns true if it does and false if it doesn't.
<%
string searchTerm = Request.QueryString.Get("searchtext");
%>
<li class="<%# MyFunctions.getKeyword(Eval("Keywords").ToString(), Request.QueryString.Get("searchtext"))%>"><%# GetDocumentLink() %></li>
<!--<li class="<%# MyFunctions.getKeyword(Eval("Keywords").ToString(), "car")%>"><%# GetDocumentLink() %></li>-->
The commented out line in the transformation works as expected, but now I want to dynamically pass in the search term (from the query string)
the repeater then returns values adding true or false to the class of each li
I then used CSS to hide (display:none;) on the items that have false applied. However, I have been told that this may not be acceptable for SEO and accessibility reasons.
Can anyone shed any light?
Thanks