Try to generalize default_template method.