All,

This is my first post to the list, and also my first project with ZF.

I'm trying to implement Zend_Layout with all the MVC elements outside of the public doc root. This also includes the new layout templates (I also tried with templates in pub tree).

This issue I'm having is that the "css" and/or "images" are not displaying. I have an image call in the base.phtml template and I'm trying to load the css from the indexController using ...

$this->view->headLink()->appendStylesheet('/css/lib.css');

It produces the proper code: <link href="css/lib.css" media="screen" rel="stylesheet" type="text/css" />

They are located in the pub tree see below:

File locations....
/application/controller/*
/application/models/*
/application/views/*
/application/views/layouts
/application/views/layouts/basic
/application/views/layouts/basic/basic.phtml // basic layout template

Base file content:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <?= $this->headTitle() ?>
    <?= $this->headLink() ?>
    <?//= $this->headScript() ?>
    <?//= $this->headStyle() ?>
</head>
<body>

// not displaying
<img src="/images/logo.gif">

    <div id="header"><?= $this->render('header.phtml') ?></div>
    <div id="nav"><?= $this->placeholder('nav') ?></div>
    <div id="content"><?= $this->layout()->content ?></div>
    <div id="content"><?= $this->render('footer.phtml') ?></div>
</body>
</html>

/public_html/images/logo.gif
/public_html/css/lib.css
/public_html/index.php // bootloader


Any thoughts would be great, I'm sure I'm missing something simple.

Cheers,
Peter


Reply via email to