Author: mickw
Date: 2006-04-10 15:48:33 +0200 (Mon, 10 Apr 2006)
New Revision: 2752
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/output/VelocityResultHandler.java
Log:
allow velocity templates to access fallbackSite
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/output/VelocityResultHandler.java
===================================================================
---
trunk/src/java/no/schibstedsok/front/searchportal/output/VelocityResultHandler.java
2006-04-10 13:26:12 UTC (rev 2751)
+++
trunk/src/java/no/schibstedsok/front/searchportal/output/VelocityResultHandler.java
2006-04-10 13:48:33 UTC (rev 2752)
@@ -92,8 +92,10 @@
public static VelocityContext newContextInstance(final VelocityEngine
engine){
final VelocityContext context = new VelocityContext();
final Site site = (Site) engine.getProperty(Site.NAME_KEY);
+ final Site fallbackSite = (Site) engine.getProperty("site.fallback");
// site
context.put(Site.NAME_KEY, site);
+ context.put("fallbackSite", fallbackSite);
context.put("locale", site.getLocale());
// publishing system
context.put(PUBLISH_URL,
engine.getProperty(SearchConstants.PUBLISH_SYSTEM_URL));
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits