Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-07-2008, 02:38 AM
lucasm's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Įguas Claras-DF, Brazil
Posts: 17
Question Wrong html from a Zend_Layout

folks,

After a lot of reading about Zend_Layout, I must miss something because I got a wrong output.

The source of layout's file is:
PHP Code:
<?php $this->doctype('HTML4_STRICT'); ?>
<html> <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <?php
    
echo $this->headTitle($this->escape($this->title));
    echo 
$this->headStyle($this->escape($this->escape(($this->baseUrl()."/css/site.css")));
     
?>
</head> <body>
<div id="content">
    <h1><?php echo $this->escape($this->title); ?></h1>
    <?php echo $this->layout()->content?>
</div> </body> </html>
The output is:
HTML Code:
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Contas</title><style type="text/css" media="screen">
<!--
/demos/conta/public/css/site.css
-->
</style></head>
<body> ....
I get some problems in it:
  • No document type declaration
  • Charset configuration is not working. My charset special characters are truncating.
  • Css file load is in wrong format.

regards,
__________________
Lucas Mauricio C. e Martins
CR Vasco da Gama, my biggest passion!

Ajude a Combater o Spam! - Help fighting spam!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2008, 02:52 PM
lucasm's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Įguas Claras-DF, Brazil
Posts: 17
Talking

guys,

After some rest, I see two foolish errors right in front of my eyes:

1) I forgot echo
PHP Code:
<?php echo $this->doctype('XHTML1_TRANSITIONAL'); ?>
2) the syntax to load a css file is appendStylesheet
PHP Code:
echo $this->headLink()->appendStylesheet($this->escape(($this->baseUrl()."/css/site.css"))); 
but, I couldn't work with charset yet.

regards,
__________________
Lucas Mauricio C. e Martins
CR Vasco da Gama, my biggest passion!

Ajude a Combater o Spam! - Help fighting spam!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:58 PM.