37101

Zendframework CSS Problem

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'); }

Recommend

  • extracting evidence of equality from match
  • How to use a custom function in a jpa query?
  • Rails: Converting from MySQL to PostGres breaks Geokit Distance Calculations?
  • Python object matching using string
  • PHP: Very simple Encode/Decode string
  • How to know if a JFrame is on screen in a multi screen environment
  • Are there “Dynamic Playlists” of unit tests in Visual Studio?
  • How do you keep a running instance for Google App Engine
  • python: forcing relative imports to search from script file
  • Python 3.2.2, error(scripts to exe)
  • Activation Function choice for Neural network
  • Sensibility of combined Maven/Ant+Ivy build management for dual platform Desktop/Android deployment?
  • Bootstrap (v3.3.4) glyphicons not displayed in IE when refresh page (F5)
  • Pycharm: Marking a folder as 'sources root' is not recursive for subfolders
  • Web.config system.webserver errors
  • OOP Javascript - Is “get property” method necessary?
  • jQuery ready not fired after rails link_to is clicked
  • Test if a set exists before trying to drop it
  • Yii2: Config params vs. const/define
  • Checking free space on FTP server
  • Change Inet root folder for iis 7
  • Algorithm for a smudge tool?
  • Display issues when we change from one jquery mobile page to another in firefox
  • Illegal mix of collations for operation for date/time comparison
  • Different response to non-authenticated users and AJAX calls
  • Fetching methods from BroadcastReceiver to update UI
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • Updated Ionic CLI but shows previous version (Windows)
  • Symfony2: How to get request parameter
  • GridView Sorting works once only
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Data Validation Drop Down Box Arrow Disappearing
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • WPF Applying a trigger on binding failure
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • How do you join a server to an Active Directory (domain)?
  • coudnt use logback because of log4j
  • Append folder name and increment by 1 using batch script
  • Unable to use reactive element in my shiny app