K
K
Konstantin2017-03-18 13:52:27
PHP
Konstantin, 2017-03-18 13:52:27

How to enable template compression on compilation?

Updated on smart3
Usually the templates themselves, for convenience they have a lot of indents, alignments.
I want this bunch of unnecessary spaces to be removed from the html code of the template when compiling
. I have large templates, this is important to me. At
first I started using just processing template files on the server so that I could remove everything unnecessary from the template,
but this is not convenient. templates cannot be touched, they can be requested by another person and the code will be compressed there, which is not convenient
, and I thought that the new smart should somehow compress the compiled file.
I found this trimwhitespace plugin,
but it doesn't do the right thing. it compresses every time it is called. and I want the template to be compressed and further we use the compressed compiled template.
well, how did you compile the check, if the template was changed, then they compressed it again ... here (what to do

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin, 2018-11-29
@armenka29

{strip}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question