Skip to content
Zotonic
  • Start
  • Guides
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Tags
  • Reference
  • Frontend developer
  • Template
  • Transform
  • HTML
  • Performance

spaceless

Removes whitespace between HTML tags.

Note

spaceless does not remove non breaking spaces and other whitespace.

Example:

{% spaceless %}
<div>
    <p>Test test test</p>
</div>
{% endspaceless %}

After rendering:

<div><p>Test test test</p></div>

New in version 0.8.

Edit on GitHub

Related documentation

Tags

lib

Combine css and javascript includes in a single request.

Filters

truncate_html

Truncate a HTML text to a maximum length.

Tags

cache

Cache frequently used rendered template output for later reuse.

Tags

filter

Filter the contents of a block through variable filters.

Tags

autoescape

Automatically apply HTML escaping to values.

Filters

brlinebreaks

Translate HTML <br/> elements into ASCII newlines ( \n ).

Tags

compose

Compose another template and override its named blocks.

Tags

use

Render a named fragment defined with tag#fragment.

Tags

useblock

Render a named tag#fragment, pass it enclosed body content, and optionally override its named blocks.

GitHub © 2026 Zotonic