Quantcast
Viewing all articles
Browse latest Browse all 30

$sodapop->view->templatePath($templateName)

templatePath() creates the path to the current template.  If no template is assigned, or the template file doesn't exist, its going to load a null template 
Location: view.sodapop.php
public function templatePath($templateName) {

if ($templateName == "")  {
## If there is not template assinged were going to load the null template
$templatePath = "./templates/null";
}
elseif (!file_exists("./templates/" . $templateName)) {

## What if there is no template to match what we are looking for?  Load the null template, that's what.
$templatePath = "./templates/null";  
}
else {
## And assuming all is well, we can load the assigned template
$templatePath = "./templates/" . $templateName;
}
return $templatePath;
}
}

Viewing all articles
Browse latest Browse all 30

Trending Articles