Skip to content
New issue

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

Can't find functions.php if parsing view #42

Open
drmikecrowe opened this issue Aug 24, 2012 · 0 comments
Open

Can't find functions.php if parsing view #42

drmikecrowe opened this issue Aug 24, 2012 · 0 comments

Comments

@drmikecrowe
Copy link

Hi folks,

I'm using Template with Dwoo, and when parsing the view, I get this error:

Error:

  • require_once(/var/www/system/../themes//lib/function.php) [function.require-once]: failed to open stream: No such file or directory
  • File: /var/www/themes/basic/views/partials/default/header.php

(notice how the theme 'basic' is missing from the header.php require)

However, I can fix it by adding the following $this->_ci->load->vars($data); in the _load_view() as below:

Is this ok? I don't know enough about the code to evaluate if this will break something.

private function _load_view($view, array $data, $parse_view = TRUE, $override_view_path = NULL)
{
    // Sevear hackery to load views from custom places AND maintain compatibility with Modular Extensions
    if ($override_view_path !== NULL)
    {
        if ($this->_parser_enabled === TRUE AND $parse_view === TRUE)
        {
            $this->_ci->load->vars($data);
            // Load content and pass through the parser
            $content = $this->_ci->parser->parse_string($this->_ci->load->file(
                $override_view_path.$view.self::_ext($view), 
                TRUE
            ), $data);
        }
(snip)

TIA
Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant