1

I try to render a Template with this function:

public function renderLastEinsatz($lastEinsatz) {
    Zend_Loader::loadClass('Zend_View');
    $view = new Zend_View();

    $view->headline = "Letzter Einsatz";
    $view->datum = $lastEinsatz->getDatum();
    $view->ort = $lastEinsatz->getOrt();
    $view->bemerkung = $lastEinsatz->getBemerkung();
    $view->setScriptPath('/library/Feuerwehr/Templates');
    return $view->render('indexArtikel.phtml');
}

My folder is: www/ htdocs/index.php library/Feuerwehr /Templates library/Zend

I set in index.php the include path to the libraries und try to use the render function with this error code:

Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'indexArtikel.phtml' not found in path (/library/Feuerwehr/Templates/)' in /var/library/Zend/View/Abstract.php on line 988 ( ! ) Zend_View_Exception: script 'indexArtikel.phtml' not found in path (/library/Feuerwehr/Templates/) in /var/library/Zend/View/Abstract.php on line 988

All files are there and i can't find a solution with google, u know the answer?

1 Answer 1

2

Script path is not valid.
Change it to:

$view->setScriptPath('/var/library/Feuerwehr/Templates');

or

$view->setScriptPath('../library/Feuerwehr/Templates');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.