Class IncludeRelativePath
- java.lang.Object
-
- org.apache.velocity.app.event.implement.IncludeRelativePath
-
- All Implemented Interfaces:
EventHandler
,IncludeEventHandler
public class IncludeRelativePath extends Object implements IncludeEventHandler
Event handler that looks for included files relative to the path of the current template. The handler assumes that paths are separated by a forward slash "/" or backwards slash "\".
- Since:
- 1.5
- Version:
- $Id$
- Author:
- Will Glass-Husain
-
-
Constructor Summary
Constructors Constructor Description IncludeRelativePath()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
includeEvent(Context context, String includeResourcePath, String currentResourcePath, String directiveName)
Return path relative to the current template's path.
-
-
-
Method Detail
-
includeEvent
public String includeEvent(Context context, String includeResourcePath, String currentResourcePath, String directiveName)
Return path relative to the current template's path.- Specified by:
includeEvent
in interfaceIncludeEventHandler
- Parameters:
includeResourcePath
- the path as given in the include directive.currentResourcePath
- the path of the currently rendering template that includes the include directive.directiveName
- name of the directive used to include the resource. (With the standard directives this is either "parse" or "include").context
- current context- Returns:
- new path relative to the current template's path
-
-