C# 클래스 NVelocity.Runtime.Directive.Include

Pluggable directive that handles the #include() statement in VTL. This #include() can take multiple arguments of either StringLiteral or Reference. * Notes: ----- 1) The included source material can only come from somewhere in the TemplateRoot tree for security reasons. There is no way around this. If you want to include content from elsewhere on your disk, use a link from somwhere under Template Root to that content. * 2) By default, there is no output to the render stream in the event of a problem. You can override this behavior with two property values : include.output.errormsg.start include.output.errormsg.end If both are defined in velocity.properties, they will be used to in the render output to bracket the arg string that caused the problem. Ex. : if you are working in html then include.output.errormsg.start= might be an excellent way to start... * 3) As noted above, #include() can take multiple arguments. Ex : #include( "foo.vm" "bar.vm" $foo ) will simply include all three if valid to output w/o any special separator. *
상속: Directive
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

공개 메소드들

메소드 설명
Init ( IRuntimeServices rs, IInternalContextAdapter context, INode node ) : void

simple init - init the tree and get the elementKey from the AST

Render ( IInternalContextAdapter context, TextWriter writer, INode node ) : bool

iterates through the argument list and renders every argument that is appropriate. Any non appropriate arguments are logged, but render() continues.

비공개 메소드들

메소드 설명
OutputErrorToStream ( TextWriter writer, String msg ) : void

Puts a message to the render output stream if ERRORMSG_START / END are valid property strings. Mainly used for end-user template debugging.

RenderOutput ( INode node, IInternalContextAdapter context, TextWriter writer ) : bool

does the actual rendering of the included file

메소드 상세

Init() 공개 메소드

simple init - init the tree and get the elementKey from the AST
public Init ( IRuntimeServices rs, IInternalContextAdapter context, INode node ) : void
rs IRuntimeServices
context IInternalContextAdapter
node INode
리턴 void

Render() 공개 메소드

iterates through the argument list and renders every argument that is appropriate. Any non appropriate arguments are logged, but render() continues.
public Render ( IInternalContextAdapter context, TextWriter writer, INode node ) : bool
context IInternalContextAdapter
writer TextWriter
node INode
리턴 bool