Inversion 'include' tag.
A tag that inserts other template files into the current template.
<?include /an/absolute/path/to/a/different/template.tmpl ?> <?include a/relative/path/to/a/different/template.tmpl ?>
Create a new IncludeTag with the specified path.
# File lib/inversion/template/includetag.rb, line 24 def initialize( path, linenum=nil, colnum=nil ) super self.log.debug "Body is: %p" % [ @body ] @path = @body @included_template = nil end
Parser callback -- append the nodes from the included template onto the tree of the including template.
# File lib/inversion/template/includetag.rb, line 48 def after_appending( parsestate ) parsestate.append_tree( @included_template.node_tree ) end
Parser callback -- Load the included template and check for recursive includes.
# File lib/inversion/template/includetag.rb, line 41 def before_appending( parsestate ) @included_template = parsestate.load_subtemplate( self.path ) end
Generated with the Darkfish Rdoc Generator 2.