{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:56Z","object_id":{"id":1296,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_base","title":"mod_base","uri":"https:\/\/zotonic.com\/id\/1296"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"references":{"objects":[{"created":"2023-09-19T08:37:15Z","object_id":{"id":2383,"is_a":["text","documentation","reference","template_filter"],"name":"doc_template_filter_filter_truncatechars","title":"truncatechars","uri":"https:\/\/zotonic.com\/id\/2383"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"refers":{"objects":[{"created":"2026-09-09T13:47:56Z","object_id":{"id":2383,"is_a":["text","documentation","reference","template_filter"],"name":"doc_template_filter_filter_truncatechars","title":"truncatechars","uri":"https:\/\/zotonic.com\/id\/2383"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-05-30T05:47:56Z","object_id":{"id":1934,"is_a":["text","documentation","reference","template_filter"],"name":"doc_template_filter_filter_truncate_html","title":"truncate_html","uri":"https:\/\/zotonic.com\/id\/1934"},"seq":1000000},{"created":"2023-09-19T08:37:15Z","object_id":{"id":2383,"is_a":["text","documentation","reference","template_filter"],"name":"doc_template_filter_filter_truncatechars","title":"truncatechars","uri":"https:\/\/zotonic.com\/id\/2383"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:47:56Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:56Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:47:56Z","object_id":{"id":2621,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template_filter","title":"Template filter","uri":"https:\/\/zotonic.com\/id\/2621"},"seq":3},{"created":"2026-09-09T13:47:56Z","object_id":{"id":2646,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_transform","title":"Transform","uri":"https:\/\/zotonic.com\/id\/2646"},"seq":4},{"created":"2026-09-09T13:47:56Z","object_id":{"id":2659,"is_a":["categorization","keyword","keyword_data_type"],"name":"zotonic_topic_text","title":"Text","uri":"https:\/\/zotonic.com\/id\/2659"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1962,"is_a":["text","documentation","reference","template_filter"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1962"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_filter_filter_truncate","page_url":{"en":"https:\/\/zotonic.com\/docs\/1962\/truncate","x-default":"https:\/\/zotonic.com\/docs\/1962\/truncate"},"preview_url":null,"resource":{"version":3991,"pivot_location_lat":null,"title":"truncate","is_authoritative":true,"body":"<p>Truncate a text to a maximum length.<\/p>\n<p>The text is truncated to the maximum length specified with the argument. The text is always truncated at a word\nboundary, to truncate at a character boundary use <a href=\"\/id\/doc_template_filter_filter_truncatechars\" class=\"doc-reference doc-reference-filter\"><code>filter#truncatechars<\/code><\/a>. If the\ntruncation is not after punctuation then the unicode ellipsis … character is appended.<\/p>\n<p>For example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ value|truncate:8 }}\n<\/code><\/pre>\n<p>If the value is <code>hello world.<\/code> then the output is <code>hello…<\/code>.<\/p>\n<p>Entities like <code>&amp;amp;<\/code> are counted as a single character.<\/p>\n<p>This filter is multibyte aware: Multi-byte UTF-8 characters are assumed to be non-breaking characters.<\/p>\n<h2>Truncating character<\/h2>\n<p>An optional second argument defines which text will be added if the text is truncated:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ value|truncate:8:&quot; (more)&quot; }}\n<\/code><\/pre>\n<p>If the value is <code>hello world.<\/code> then the output is <code>hello (more)<\/code>.<\/p>","slug":"truncate","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"99700e9685cb406e8fac7ac9ad5fea83a4b749e3f42773ce94545e973e4626ad","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":325,"is_a":["meta","category"],"name":"template_filter","title":"Filters","uri":"https:\/\/test.zotonic.com\/id\/325"},"doc_source_path":"apps\/zotonic_mod_base\/src\/filters\/filter_truncate.erl","publication_start":"2023-06-24T08:17:49Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_base\/src\/filters\/filter_truncate.erl","pivot_location_lng":null,"doc_source_kind":"filter","name":"doc_template_filter_filter_truncate","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:46Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_base","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"0b3bab3bb18f64f97acf92b23ea5baf8ae6b410f\n","erlang_module":"filter_truncate","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-09-30T09:00:17Z","title_slug":"truncate"},"uri":"https:\/\/zotonic.com\/id\/1962","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1962"}},"status":"ok"}