We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't load a template in a subfolder.
When I use this:
$rainTpl->draw("work/overview");
It does this
C:\wamp\www\ravenproj/storage/themes/minimal/overview.html
but when changing to
$rainTpl->draw("work\overview");
then it works.. but how can I let it work with forward slashes
C:\wamp\www\ravenproj/storage/themes/minimal/work\overview.html
The text was updated successfully, but these errors were encountered:
I just fixed it for my project, Here is my solution:
protected function _check_template( $template ){ // set filename $template_name = basename( $template );
$template_basedir = dirname($template)== '.' ?null: dirname($template) . '/'; $template_directory = (strpos($template,"//")=== false&&strpos($template,":\\")=== false)?static::$conf['tpl_dir'] . $template_basedir:$template_basedir; $template_filepath = $template_directory . $template_name . '.' . static::$conf['tpl_ext']; $parsed_template_filepath = static::$conf['cache_dir'] . $template_name . "." . md5( $template_directory . serialize( static::$conf['checksum'] ) ) . '.rtpl.php'; // if the template doesn't exsist throw an error if( !file_exists( $template_filepath ) ){ $e = new RainTpl_NotFoundException( 'Template '. $template_name .' not found!' ); throw $e->setTemplateFile($template_filepath); } // Compile the template if the original has been updated if( static::$conf['debug'] || !file_exists( $parsed_template_filepath ) || ( filemtime($parsed_template_filepath) < filemtime( $template_filepath ) ) ) $this->_compile_file( $template_name, $template_basedir, $template_filepath, $parsed_template_filepath ); return $parsed_template_filepath; }
Sorry, something went wrong.
No branches or pull requests
I can't load a template in a subfolder.
When I use this:
It does this
but when changing to
then it works.. but how can I let it work with forward slashes
The text was updated successfully, but these errors were encountered: