Anyone familiar with Zend (can't load CSS style)?

Hi all,

I’m new to Zend and I’m reading forum posts for 2 days on how to load a css stylesheet to a Zend-controlled page. I tried several solutions provided (@Zend even some [URL=“http://www.zendcasts.com/using-blueprint-css-with-zend-2/2009/01/”]videos), now I have this :


// AccountController.php
public function newAction()
    {
        // action body
      $this->view->headLink()->appendStylesheet('/css/style.css', 'all');
      $form = $this->getSignupForm();
      $this->view->form = $form;
    }

and I have the account/new.phtml :


<!-- views/scripts/account/new.phtml -->
<head>
<?php
echo $this->headTitle('New Account Sign up');
echo $this->headLink();
?>
</head>

When I look at the source code in the browser, there’s the line which suppose to load the stylesheet :


<link href="/css/style.css" media="all" rel="stylesheet" type="text/css" />

and my style.css file is located in the public/css folder BUT NO changes to the layout at all… It’s driving me crazy I really don’t know where should I look for mistakes… Any help is appreciated!

Could it be something as simple as needing to clear your browser cache? Have you tried this in another browser? If you enter the path to the CSS file in your browser, does the CSS file open in your browser?

Thank yo ralph for the reply. Yes, I tried to open the page in another browser. I also started a new “Hello World” project with a css framework grid960. The result was the same :frowning:

Hmmm… I managed to load the CSS style successfully in my brand new project “Hello World” with layout enabled, but seems something is wrong with my configurations. I believe this is NOT the correct way to load the CSS :


<? $this->headLink()->appendStylesheet('/helloworld/public/css/screen.css', 'screen, projection'); ?>
<? $this->headLink()->appendStylesheet('/helloworld/public/css/ie.css', 'screen, projection', 'IE'); ?>
<? $this->headLink()->appendStylesheet('/helloworld/public/css/print.css', 'print'); ?>
<? $this->headLink()->appendStylesheet('/helloworld/public/css/main.css'); ?>

is it?