1.

How To Include Css From Controller And View In Zend

Answer»

From WITHIN a VIEW file: $this->headLink()->appendStylesheet(‘filename.css’);
From within a controller: $this->view->headLink()->appendStylesheet(‘filename.css’);

And then SOMEWHERE in your layout you need to echo out your headLink OBJECT:

headLink();?>

From within a view file: $this->headLink()->appendStylesheet(‘filename.css’);
From within a controller: $this->view->headLink()->appendStylesheet(‘filename.css’);

And then somewhere in your layout you need to echo out your headLink object:

headLink();?>



Discussion

No Comment Found