Created
August 21, 2013 23:18
-
-
Save funnelback/6301440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#--- Checks if a query blending occurred and provide a link to cancel it. | |
@param prefix : Prefix to blended query terms, defaults to "Your query has been expanded to: ". | |
@param linkText : Text for the link to cancel query blending, defaults to "Click here to use verbatim query". | |
--> | |
<#macro CheckBlending prefix="Your query has been expanded to: " linkText="Do not do this"> | |
<#if response?? && response.resultPacket?? | |
&& response.resultPacket.QSups?? && response.resultPacket.QSups?size > 0> | |
${prefix} <span><#list response.resultPacket.QSups as qsup> ${qsup.query}<#if qsup_has_next>, </#if></#list></span>. | |
<a href="?${QueryString}&qsup=off">${linkText}</a> | |
</#if> | |
</#macro> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment