Bonjour,

J'ai un problème particulier que je n'arrive pas à cerner, j'ai un layout avec un formulaire d'authentification, et j'ai une marge sur ce formulaire quand je regarde le code html généré je m'aperçois qu'il y a du texte vide juste avant ma balise <form>, j'ai aussi ce texte vide avant mon <body> et avec firebug mes fichiers css sont inclus dans le body au lieu du head alors qu'ils sont correctements placés dans le layout, voici mes fichiers :


//layout.phtml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 
<?php echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php echo $this->headTitle(); ?>
	<meta name="description" content="description" />
	<meta name="keywords" content="keyword" />
	<meta name="author" content="author" />
	<meta charset="UTF-8" />
	<!--[if IE]>
	<script src="/scripts/html5-ie.js"></script>
	<link href="/css/themes/colorpaper/ie.css" media="screen" rel="stylesheet" type="text/css" />
	<![endif]--> 
	 <?php echo $this->headLink()->appendStylesheet('/css/themes/colorpaper/style.css')
								 ->appendStylesheet('/css/themes/colorpaper/reset-min.css');?>
 
</head>
<body>
<div id="bgRepeatBottom">
			<div id="bgTop">
				<div id="bgBottom">
					<div id="content">
					<header>
						<nav>
							<a href="<?php echo $this->url(array('controller'=>'index'),'default',true) ?>" title="Accueil" >Accueil</a>
							<a href="<?php echo $this->url(array('controller'=>'concept'),'default',true) ?>" title="Concept du site" >Concept du site</a>
							<a href="<?php echo $this->url(array('controller'=>'rss'),'default',true) ?>" title="RSS" >RSS</a>
							<a href="<?php echo $this->url(array('controller'=>'contact'),'default',true) ?>" title="Contact">Contact</a>
						</nav>
					</header>	
						<div id="brdTopContent"></div>
						<div id="page">
							<div id="leftContent">
								<section id="searchengine">
									 <h1><?php echo $this->escape($this->title); ?></h1>
									<?php echo $this->layout()->contenu;?>
								</section>	
								<div id="backgroundBottomLeftContent"></div>
								<section id="news">
 
								</section>
							</div>
							<div id="rightContent">
								<section id="log">
									<h1> Authentification </h1>
									<?php echo $this->action('index','login'); ?>	
								</section>	
								<section id="statistics">
 
								</section>
								<section id="ranking">		
 
								</section>
							</div>
							<div class="spacer"></div>
						</div>
						<footer>
							<nav>
								<a href="<?php echo $this->url(array('controller'=>'index'),'default',true) ?>" title="Accueil" >Accueil</a>
								<a href="<?php echo $this->url(array('controller'=>'concept'),'default',true) ?>" title="Concept du site" >Concept du site</a>
								<a href="<?php echo $this->url(array('controller'=>'rss'),'default',true) ?>" title="RSS" >RSS</a>
								<a href="<?php echo $this->url(array('controller'=>'contact'),'default',true) ?>" title="Contact">Contact</a>
							</nav>
						</footer>
					</div>
				</div>
			</div>
		</div>
</body>
</html>

//bootstrap
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
 
	protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('HTML5');
		$view->headTitle('Search Events');
		$view->headTitle()->setSeparator(' - ');
 
    }
 
	protected function _initAutoload()
	{
		$moduleLoader = new Zend_Application_Module_Autoloader(array(
			'namespace' => '',
			'basePath' => APPLICATION_PATH));
 
		return $moduleLoader;
	}
 
}
login/index.phtml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
<?php echo $this->login;?>
//login form

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
<?php
	class Form_Login extends Zend_Form
	{
		public function __construct($options = null)
		{
			parent::__construct($options);
			$this->setName('login');
 
			$idForm = new Zend_Form_Element_Hidden('form');
			$idForm->removeDecorator('HtmlTag')
				   ->removeDecorator('label')
				   ->setAttrib('id', 'formLog')
				   ->setValue('formLog');
 
			$email = new Zend_Form_Element_Text("emailLog",array('size' => 25));		
			$email ->setLabel('E-mail *')
				   ->setRequired(true)
				   ->addFilter('StringTrim')
				   ->addFilter('StripTags')
				   ->addValidator('NotEmpty', true , array('messages' => array('isEmpty' => 'Vide')))
				   ->addValidator('EmailAddress');
 
 
			$email->addDecorator(new My_Form_Decorator_Html(array('html' => "<div class='spacer'></div>",'placement' => 'append')));
 
			$password = new Zend_Form_Element_Password("passwordLog", array('size' => 25));
			$password ->setLabel('Mot de passe *')
					  ->setRequired(true)
					  ->addFilter('StringTrim')
					  ->addValidator('NotEmpty', true , array('messages' => array('isEmpty' => 'Vide')));
			$password->addDecorator(new My_Form_Decorator_Html(array('html' => "<div class='spacer'></div>",'placement' => 'append')));	
 
 
			$valider = new Zend_Form_Element_Submit('valider');
			$valider->addDecorator(new My_Form_Decorator_Html(array('html' => "<a title='Inscription' href='/users/ajouter' id='inscription-link'>Inscription</a>",'placement' => 'append')));	
			$valider->setAttrib('id', 'boutonValider')
					 ->removeDecorator('DtDdWrapper');	
 
			$this->addElements(array($idForm,$email,$password,$valider));
 
 
 
		}
 
	}