#macro(param $key)$request.params.get($key)#end #macro(url_for_solr)/solr#if($request.core.name != "")/$request.core.name#end#end #macro(url_for_home)#url_for_solr/browse#end #macro(q)&q=$!{esc.url($params.get('q'))}#end #macro(fqs $p)#foreach($fq in $p)#if($velocityCount>1){end}fq=$esc.url($fq)#end#end #macro(debug)#if($request.params.get('debugQuery'))&debugQuery=true#end#end #macro(boostPrice)#if($request.params.get('bf') == 'price')&bf=price#end#end #macro(annotate)#if($request.params.get('annotateBrowse'))&annotateBrowse=true#end#end #macro(annTitle $msg)#if($annotate == true)title="$msg"#end#end #macro(spatial)#if($request.params.get('sfield'))&sfield=store#end#if($request.params.get('pt'))&pt=$request.params.get('pt')#end#if($request.params.get('d'))&d=$request.params.get('d')#end#end #macro(qOpts)#set($queryOpts = $request.params.get("queryOpts"))#if($queryOpts && $queryOpts != "")&queryOpts=$queryOpts#end#end #macro(group)#if($request.params.getBool("group") == true)&group=true#end#if($request.params.get("group.field"))#foreach($grp in $request.params.getParams('group.field'))&group.field=$grp#end#end#end #macro(lensNoQ)?#if($request.params.getParams('fq') and $list.size($request.params.getParams('fq')) > 0)fqs($request.params.getParams('fq'))#end#debug#boostPrice#annotate#spatial#qOpts#group#end #macro(lens)#lensNoQ#q#end #macro(url_for_lens)#{url_for_home}#lens#end #macro(url_for_start $start)#url_for_home#lens&start=$start#end #macro(url_for_filters $p)#url_for_home?#q#boostPrice#spatial#qOpts#if($list.size($p) > 0)fqs($p)#end#debug#end #macro(url_for_nested_facet_query $field)#url_for_home#lens&fq=$esc.url($field)#end ## TODO: convert to use {!raw f=$field}$value (with escaping of course) #macro(url_for_facet_filter $field $value)#url_for_home#lens&fq=$esc.url($field):%22$esc.url($value)%22#end #macro(url_for_facet_date_filter $field $value)#url_for_home#lens&fq=$esc.url($field):$esc.url($value)#end #macro(url_for_facet_range_filter $field $value)#url_for_home#lens&fq=$esc.url($field):$esc.url($value)#end #macro(link_to_previous_page $text) #if($page.current_page_number > 1) #set($prev_start = $page.start - $page.results_per_page) $text #end #end #macro(link_to_next_page $text) #if($page.current_page_number < $page.page_count) #set($next_start = $page.start + $page.results_per_page) $text #end #end #macro(link_to_page $page_number $text) #if($page_number == $page.current_page_number) $text #else #if($page_number <= $page.page_count) #set($page_start = $page_number * $page.results_per_page - $page.results_per_page) $text #end #end #end #macro(display_facet_query $field, $display, $fieldName) #if($field.size() > 0) $display