View Single Post
  #5 (permalink)  
Old 04-29-2008, 04:55 PM
Amurdel Amurdel is offline
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default

Quote:
Originally Posted by notrub225 View Post
I am trying to set the Doctype of my site in the bootstrapper:

PHP Code:
// Set the Doctype to XHTML 1.0 TRANSITIONAL for purposes of view helpers
$viewRenderer Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewRenderer->view->doctype('XHTML1_TRANSITIONAL'); 
However I get this error message:

PHP Code:
Fatal error:  Call to a member function doctype() on a non-object in /srv/httpd/highlandgroupinc.com/html/els/certificates/index.php on line 33 
I know this error means that I am not creating an instance of the viewRenderer properly or that I am applying the method function to the wrong type of object.

What is the correct way to set the doctype in the bootstrap file?
Try to use this
PHP Code:
// Set the Doctype to XHTML 1.0 TRANSITIONAL for purposes of view helpers
$viewRenderer Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewRenderer->initView();
$viewRenderer->view->doctype('XHTML1_TRANSITIONAL'); 
Sorry for my english
Reply With Quote