[eluser]Jacob Krustchinsky[/eluser]
Hello,
Im trying to create a simple template system that works as follows.
Within the views folder there are two sub-directories labeled, themes and templates. The themes houses a header.tpl and footer.tpl as well as the theme specific styles and graphics. The templates houses a default set of view templates in correspondence with their appropriate controllers. When I go to render a template I simply call $this->template->render($template_name, $data); . Now the issues is, I want to check if a file exists in the theme folder with the template_name, if so render that file otherwise render the one in the default set. How can I check if the file_exists in the themes folder from within a library class? I cant use file exists and fopen returns an error. Any help?