code: @Override
  	public void renderTemplate(final String templateName, final Map<String, Object> context, final Map<String, WComponent> taggedComponents,
  			final Writer writer, final Map<String, Object> options) {
  
  		LOG.debug("Rendering velocity template [" + templateName + "].");
  
  		// Velocity uses a ClassLoader so dont use an absolute path.
  		String name = templateName.startsWith("/") ? templateName.substring(1) : templateName;
  
  		try {
  
  			// Load template
  			Template template = getVelocityEngine().getTemplate(name);
  
  			// Map the tagged components to be used in the replace writer
  			Map<String, WComponent> componentsByKey = TemplateUtil.mapTaggedComponents(context, taggedComponents);
  
  			// Setup context
  			VelocityContext velocityContext = new VelocityContext();
  			for (Map.Entry<String, Object> entry : context.entrySet()) {
  				velocityContext.put(entry.getKey(), entry.getValue());
  			}
  
  			// Write template
  			UIContext uic = UIContextHolder.getCurrent();
  			try (TemplateWriter velocityWriter = new TemplateWriter(writer, componentsByKey, uic)) {
  				template.merge(velocityContext, velocityWriter);
  			}
  		} catch (ResourceNotFoundException e) {
  			throw new SystemException("Could not find velocity template [" + templateName + "]. " + e.getMessage(), e);
  		} catch (Exception e) {
  			throw new SystemException("Problems with velocity template [" + templateName + "]. " + e.getMessage(), e);
  		}
  	}
docs: {@inheritDoc}