pub fn add_template_file<P: AsRef<Path>>(&mut self, path: P, name: Option<&str>) -> Result<()> {
        self.add_file(name, path)?;
        self.build_inheritance_chains()?;
        self.check_macro_files()?;
        Ok(())
    }
/// Add a single template from a path to the Tera instance. The default name for the template is
/// the path given, but this can be renamed with the `name` parameter
///
/// This will error if the inheritance chain can't be built, such as adding a child
/// template without the parent one.
/// If you want to add several file, use [Tera::add_template_files](struct.Tera.html#method.add_template_files)
///
/// ```rust,ignore
/// // Use path as name
/// tera.add_template_file(path, None);
/// // Rename
/// tera.add_template_file(path, Some("index");
/// ```
Add a single template from a path to the Tera instance. The default name for the template is
the path given, but this can be renamed with the `name` parameter

This will error if the inheritance chain can't be built, such as adding a child
template without the parent one.


Add a single template from a path to the Tera instance . The default name for the template is the path given but this can be renamed with the ` name ` parameter This will error if the inheritance chain can ' t be built such as adding a child template without the parent one .
pub fn add_template_file<P: AsRef<Path>>(&mut self, path: P, name: Option<&str>) -> Result<()> {
        self.add_file(name, path)?;
        self.build_inheritance_chains()?;
        self.check_macro_files()?;
        Ok(())
    }
pub fn add_template_file < P : AsRef < Path > > ( & mut self , path : P , name : Option < & str > ) -> Result < ( ) > { self . add_file ( name , path ) ? ; self . build_inheritance_chains ( ) ? ; self . check_macro_files ( ) ? ; Ok ( ( ) ) }
Add a single template from a path to the Tera instance.
Add a single template from a path to the Tera instance .
&mut self
path
P
name
Option<&str>
&mut self
path
P
name
Option<&str>