
Question:
I am very to new to zend frame work , I am trying to set up a project (Done by other programmer) in my local server, i have setted up this project, but all pages are styless in my browser, ie the CSS files are not taken in phtml pages, For solving this issue which file I have ti Edit?
Plss Help me
Answer1:It depends upon the directory structure that your app has adapted. However checkout if you have views/scripts directory then, again depending upon the directory style used, the header.phtml file (if exist) will have invalid link to css.
If you dont have header.phtml, then use any text-editor and search in your views directory with keyword 'css', and you will get to know the possible file name.
Answer2:Global css files I would add in the bootstrap file and any styles that relate to a page I would add in the relevant controller action for example...
<strong>global styles in bootstrap file</strong>
protected function _initView()
{
$this->view = new Zend_View();
$this->view->headLink()->appendStylesheet('css/global.css');
}
<strong>or in a specific controller action</strong>
public function myPageAction()
{
$view = $this->view;
$view->headLink()->appendStylesheet('css/myPageStyles.css');
}