Answer the question
In order to leave comments, you need to log in
How to display formatted html in Zend Framework?
All templates and outputs are neatly formatted, but when viewing the source of the html page, the code is absolutely unreadable. Formatting occurs according to the "taboo" and with the help of NetBeans.
Where to dig and how to solve the problem?
Answer the question
In order to leave comments, you need to log in
In addition to the template, this can be done at the Front_Controller plugin level - approximately at the postDispatch level. Dig Bootstrap
Also, compression can be at the server level - see installed modules.
In general, it's better to use Firebug (under Firefox) or Developer Tools (under Google Chrome) - it's more convenient.
Do you keep in mind that ?> eats \n after itself?
<div class="block">
<?php echo $block; ?>
</div><!-- Эта строчка сольется с предыдущей... -->
<div class="block">
<?php echo $block; ?>
</div>
I take it into account, but the code is not even the same as in the example.
There can be a lot of carriage returns between the text, although the cycle is neatly written.
Example:
layout.phtml
<?php echo $this->headTitle(); ?>
<?php echo $this->headMeta(); ?>
<?php
$this->headLink()->appendStylesheet('/css/reset_style.css');
$this->headLink()->appendStylesheet('/css/style.css');
?>
<?php
$this->headScript()->appendFile('/js/jquery.js');
?>
<?php echo $this->magicHeadLink(); ?>
<?php echo $this->magicHeadScript(); ?>
<title>Товары</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="Товары" />
<meta name="description" content="Товары" />
<link href="cache/css/4c076c66d6f959e64839691c59d1f549_uds.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="cache/js/3bfaccafaad5ffb915b381bc32527b76_uds.js"></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question