<?php $this->renderPartial('../layouts/header'); ?>
<div class="span-24 last tw-container">....
But when I did it I see some changes in the page, the strange indent occured in the top of the page. I have the template just like here. Without separated files it looks good, but with one, the inscription "Uploadify" ( "Logo" in my case ) is shifted about 20px to the bottom.
I have no any line breaks or tabulation in both layouts and the source code of the page looks same in both cases.
I dont know with what it may be due. Do you have any ideas?
Aha, if the source code on the client is really the same as you claim, Yii must do something magic and cast a spell on your browser, to let your browser know, that this same source code has been generated by Yii and needs to be rendered different now
Please check again thoroughly. There must be a difference in source/CSS on the client, otherwhise the rendered result must be the same.
There’s one issue i can think about: If a line ends with an close PHP block marker ?> the newline character after it will be removed. So if your layout somehow depends on a newline after <?php $this->renderPartial(…) ?>, make sure, that you add a space character after ?>.
I recheck one more time the source code in both cases, ones are absolutely same. I tried to replace the renderPartial by require_once, and add the space character after the end market but it doesn’t give the needed effect.
I even tried to use the contentCompactor extension for deleting the line breaks of all content. Now my content is a one line, but it doesn’t helps too…
As Mike said, if final result (final html when Yii finish all its work) is the same in both cases, then is imposible that they are rendered diferent by the browser (wich doesnt know if you use one method or another)…
You are right Mike. It’s not visible in the browser. I saved both pages and open ones via Notepad++. Take a look please on printscreens: without renderPartial and with . It’s the strange sign in the seven line. How can I delete it?
Forget to say. In this example I include only css and js files. header.php is:
That’s what i did, I delete all includes from header.php, it’s completely empty now, and then I exclude scrollable plugin. Now I have no any css or js files at all. But even now I have that sign ( printscreen ).