Template::get_template_file( string|array|null $name = null )

Returns the template file the View will use to render.

If a template cannot be found for the view then the base template for the view will be returned.


Parameters

$name

(string|array|null) (Optional) Either a specific name to check, the frgments of a name to check, or null to let the view pick the template according to the template override rules.

Default value: null


Top ↑

Return

(string) The path to the template file the View will use to render its contents.


Top ↑

Source

File: src/Tribe/Views/V2/Template.php

	public function get_template_file( $name = null ) {
		$name = null !== $name ? $name : $this->slug;

		$template = parent::get_template_file( $name );

		return false !== $template
			? $template
			: $this->get_base_template_file();
	}

Top ↑

Changelog

Changelog
Version Description
4.9.2 Introduced.