PDA

View Full Version : more readable html code from *.tpl


pmarkov
02-03-2006, 06:14 AM
Hello

When I View --> Source of the phpLD's generated page the html code is not very suitable for reading. There are missing '\n'. Is it possible to modify tpl files so generated html code to be more readable - as it is hand-made?

Thanks in advance!

David
02-03-2006, 06:18 AM
I believe it was designed to be as compact as possible for speed.
I don't know the "quick" answer, but maybe somebody would know.

pmarkov
02-03-2006, 07:59 PM
Hello

But I thing that extra spaces and cartridge return symbols do not affect performance.

Boby
02-03-2006, 08:09 PM
Open the .tpl files and look for the Smarty function {strip} with it's ending {/strip}.
Go throught all .tpl files and remove them. Usually they are located at the beginning and at the end of each file.

This function removes extra whitespace and carriage returns to prevent whitespace problems.

All about this function you can find by accessing the following link:
http://smarty.php.net/manual/en/language.function.strip.php

Boby