-- Denis Fohl <[EMAIL PROTECTED]> wrote
(on Friday, 18 April 2008, 05:18 PM +0200):
> i followed your advice and tried with absolute path but it gaves me the  
> same error :
>
> bootstrap :
> Zend_Layout::startMvc(array('layoutPath' =>  
> 'h:/project/developpement/site/application/layouts'));
> Zend_Layout::getMvcInstance()->getView()->doctype(Zend_View_Helper_Doctype::XHTML1_STRICT);
>
> Zend_View_Exception: script 'header.phtml' not found in path  
> (h:\project\developpement\site\application\layouts\;.\views\scripts\) in  
> E:\phplib\Zend\View\Abstract.php on line 857
>
> But the app is running without the second line of code (absolute path is  
> correct).

That's hard to believe, as the operation does not render anything. Are
you sure there is a 'header.phtml' file in the layouts directory?

> Also, your proposal was certainly for test purpose only since i can't  
> believe it's a solution to code absolute path ! ;-)

I was hoping you'd use realpath('./application/layouts') instead of
actually coding it. :-)

I'll see if I can recreate the issue, but it would be good if you could
give a small skeleton showing where your various files are, and what
your layout script is doing.

> Matthew Weier O'Phinney a écrit :
>> -- Denis Fohl <[EMAIL PROTECTED]> wrote
>> (on Friday, 18 April 2008, 04:09 PM +0200):
>>> thank you for answering,
>>>
>>> with your line in my bootstrap i have :
>>> Zend_Layout::startMvc(array('layoutPath' => './application/layouts'));
>>
>> Ues a more qualified path for the above; best bet is to use an absolute
>> path.
>>
>>> Zend_Layout::getMvcInstance()->getView()->doctype(Zend_View_Helper_Doctype::XHTML1_STRICT);
>>>
>>> and it generates an error :
>>> Zend_View_Exception: script 'header.phtml' not found in path   
>>> (.\application\layouts\;.\views\scripts\) in   
>>> E:\phplib\Zend\View\Abstract.php on line 857
>>>
>>> i'm not fluent at all with MvcInstance so i tried it straight, maybe  
>>> i've to adapt it to my app but don't know how.
>>>
>>> Denis.
>>>
>>>
>>>
>>> Vladas Diržys a écrit :
>>>> or just one line code:
>>>>
>>>> Zend_Layout::getMvcInstance()->getView()->doctype(Zend_View_Helper_Doctype::XHTML1_STRICT);
>>>>
>>>> On Wed, Apr 16, 2008 at 6:33 PM, Denis Fohl <[EMAIL PROTECTED]   
>>>> <mailto:[EMAIL PROTECTED]>> wrote:
>>>>
>>>>     Thank you Vincent,
>>>>
>>>>     that's not exactly what i was looking for but it helps.
>>>>
>>>>     Denis.
>>>>
>>>>     Vincent a écrit :
>>>>
>>>>
>>>>
>>>>         On 4/16/08, *Denis Fohl* <[EMAIL PROTECTED]
>>>>         <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
>>>>         <mailto:[EMAIL PROTECTED]>>> wrote:
>>>>
>>>>            Hi all,
>>>>
>>>>            in comments to this tutorial :
>>>>                    
>>>> http://codeutopia.net/blog/2008/03/17/introduction-to-zend_layout-updated-for-zf-15/
>>>>
>>>>            Matthew said : "I'd recommend calling the doctype() helper
>>>>         with the
>>>>            doctype you want from your bootstrap. "
>>>>
>>>>            how to do that ?
>>>>
>>>>
>>>>         I currently do it like this:
>>>>
>>>>         $viewRenderer =
>>>>         
>>>> Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
>>>>         $view = new Zend_View(array('encoding' => 'utf-8'));
>>>>         $view->doctype('XHTML1_STRICT');
>>>>         $viewRenderer->setView($view);
>>>>
>>>>            Thanks.
>>>>
>>>>            --    Denis
>>>>
>>>>
>>>>         --         Vincent
>>>>
>>>>
>>>>     --     Denis Fohl
>>>>     --------------
>>>>     df-info
>>>>     06 84 38 21 99
>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Pagarbiai // Gruß,
>>>> Vladas Diržys
>>>> tel.: +370 620 69020 (Omnitel)
>>>> +370 677 17851 (Tele2)
>>>> www.dirzys.com <http://www.dirzys.com>
>>> -- 
>>> Denis Fohl
>>> --------------
>>> df-info
>>> 06 84 38 21 99
>>>
>>
>
> -- 
> Denis Fohl
> --------------
> df-info
> 06 84 38 21 99
>

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to