You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2009/09/14 22:55:12 UTC
svn commit: r814849 -
/lucene/solr/trunk/contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm
Author: ehatcher
Date: Mon Sep 14 20:55:12 2009
New Revision: 814849
URL: http://svn.apache.org/viewvc?rev=814849&view=rev
Log:
Add nl2ul macro for convenient rendering of a NamedList. Added q parameter to url_for_start macro
Modified:
lucene/solr/trunk/contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm
Modified: lucene/solr/trunk/contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm?rev=814849&r1=814848&r2=814849&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm (original)
+++ lucene/solr/trunk/contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm Mon Sep 14 20:55:12 2009
@@ -1,10 +1,23 @@
+
+
+
+#macro(nl2ul $named_list)
+ <ul>
+ #foreach($kv in $named_list)
+ <li>$kv.key ($kv.value)
+ #nl2ul($kv.value)
+ </li>
+ #end
+ </ul>
+#end
+
#macro(url_for_filters $filter_queries)
/solr/itas?fq=$filter_queries
#end
#macro(url_for_home)/solr/itas#end
-#macro(url_for_start $start)/solr/itas?start=$start#end
+#macro(url_for_start $start)/solr/itas?start=$start&q=$!{esc.url($params.get('q'))}#end
## TODO: need to add escaping
#macro(url_for_nested_facet $field $value)/solr/itas?fq=$field:%22$value%22#end