Précédent   Forum des professionnels en informatique > PHP > Outils > Zend > Zend Framework
Zend Framework Forum d'entraide sur la programmation PHP avec Zend Framework. Avant de poster -> FAQ ZF, Cours ZF
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 12/12/2011, 13h07   #1
Nouveau Membre du Club
 
Inscription : février 2009
Messages : 261
Détails du profil
Informations forums :
Inscription : février 2009
Messages : 261
Points : 30
Points : 30
Par défaut Haut de la page ne s'affiche pas

Bonjour, sur certains de mes controleurs, le haut des pages ne s'affichent pas alors que quand je regarde le code généré, tout se passe bien.

J'ai essayé de débugué tout seul et j'ai remarqué que si j'efface la ligne du dictype:
Code :
1
2
 
<?php echo $this->doctype('XHTML1_STRICT'); ?>
Tout s'affiche correctement mais je ne pense pas que ça soit correct s'il n'y a pas de doctype..

Mon problème est apparu lorsque j'ai voulu faire une refonte de mon projet où j'y ai juste modifié la BDD et depuis j'ai ce problème d'affichage..

Voici mon layout:
Code :
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
 
<?php echo $this->doctype('HTML4_STRICT'); ?>
<html lang="fr">
<head>
    <?php
    // Balises Meta
    $this->headMeta()->appendName('robots', 'noindex,nofollow')
                     ->appendHttpEquiv('content-script-type', 'text/javascript')
                     ->appendHttpEquiv('content-type', 'text/html; charset=utf-8')
                     ->appendHttpEquiv('imagetoolbar', 'no')
                     ->appendName('MSSmartTagsPreventParsing', 'true');
    if (APPLICATION_ENV != 'production') 
    {
    	$this->headMeta()->appendHttpEquiv('cache-control', 'no-cache')
                         ->appendHttpEquiv('pragma', 'no-cache');
    }
    echo $this->headMeta();
 
    // Titre
    echo $this->headTitle('Titre du projet');
 
    // Feuilles de style, favicon
    echo $this->headLink(
    array(
           'rel'  => 'shortcut icon',
           'href' => '/images/divers/icone.ico',
           'type' => 'images/x-icon',
         )
    )->appendStylesheet(
            '/css/style.css',
            'screen,projection'
    );
 
    // Feuilles de style javascript
    echo $this->headScript()->appendFile(
    					'/js/javascript.js',
                       	'text/javascript'
                         )
                            ->appendFile(	
                       	'/js/jquery_1_6_4.js',
                      	'text/javascript'
                         );
    ?>
</head>
 
<body>
 
<div class="drapeau">
	<a href=<?= $this->link('index', 'language', null, array('lang' => 'fr'))?> ><img src=<?php echo $this->baseUrl() . 'images/divers/drapeau_france.png'; ?> title="Français" height="40px" /></a>
	<a href=<?= $this->link('index', 'language', null, array('lang' => 'en'))?> ><img src=<?php echo $this->baseUrl() . 'images/divers/drapeau_angleterre.png'; ?> title="English" height="40px" /></a>
</div>
 
<div id="menu">
	<ul>  
		<li><a onclick="displayPage('<?php echo $this->baseUrl() . "/index/index"; ?>')"><?php echo $this->translate("Accueil"); ?></a></li>
		<li><a onclick="displayPage('<?php echo $this->baseUrl() . "/index/cv"; ?>')"><?php echo $this->translate("CV"); ?></a></li>
		<li><a onclick="displayPage('<?php echo $this->baseUrl() . "/index/portfolio"; ?>')"><?php echo $this->translate("Portfolio"); ?></a></li>
		<li><a href=<?php echo $this->url(array("controller" => "index", "action" => "contact"), null, true); ?> ><?php echo $this->translate("Contact"); ?></a></li>
		<li><a onclick="displayPage('<?php echo $this->baseUrl() . "/index/voir-commentaires"; ?>')"><?php echo $this->translate("Commentaires"); ?></a></li>
	</ul>
</div>
 
<div class="corps" id="corps">
	<?php echo $this->layout()->content; ?>
</div>
 
</body>
</html>
Suivant mon controleur, j'ai soit tout qui s'affiche, soit tout à partir de mes vues donc à partir de la ligne:
Code :
1
2
 
<?php echo $this->layout()->content; ?>
J'ai regardé la différence entre un controleur qui affiche tout correctement et un où ca ne va pas avec une action index où je ne fais rien et il n'y a pas de différence.

Comment ça se fait que certaines pages ne s'affichent pas correctement?
absot est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 01h33.


 
 
 
 
Partenaires

Hébergement Web