Default parent template to "index" and added sanity check if template exists.
This commit is contained in:
parent
20b0d55839
commit
d64251c098
2 changed files with 5 additions and 2 deletions
|
@ -123,7 +123,10 @@ abstract class Display_Common extends Object
|
|||
$template_path = SITE_TEMPLATE_PATH . ($type == 'parent' ? '__shared/' : '');
|
||||
$template_file = $template_path . $template . ($this->extension != false ? '.' . $this->extension : '');
|
||||
|
||||
$this->$template_name = $template_file;
|
||||
if (file_exists($template_file))
|
||||
{
|
||||
$this->$template_name = $template_file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue