{"result":{"depiction_url":null,"edges":{"refers":{"objects":[{"created":"2026-09-09T13:48:28Z","object_id":{"id":1325,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_catinclude","title":"catinclude","uri":"https:\/\/zotonic.com\/id\/1325"},"seq":1000000},{"created":"2026-09-09T13:48:28Z","object_id":{"id":1346,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_block","title":"block","uri":"https:\/\/zotonic.com\/id\/1346"},"seq":1000000},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2506,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_compose","title":"compose","uri":"https:\/\/zotonic.com\/id\/2506"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-09T13:48:28Z","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:48:28Z","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:48:28Z","object_id":{"id":2573,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_categorization","title":"Categorization","uri":"https:\/\/zotonic.com\/id\/2573"},"seq":3},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2620,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template","title":"Template","uri":"https:\/\/zotonic.com\/id\/2620"},"seq":4},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2641,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_render","title":"Render","uri":"https:\/\/zotonic.com\/id\/2641"},"seq":5},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2691,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_maintainability","title":"Maintainability","uri":"https:\/\/zotonic.com\/id\/2691"},"seq":6}],"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":2508,"is_a":["text","documentation","reference","template_tag"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2508"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_tag_tag_catcompose","page_url":{"en":"https:\/\/zotonic.com\/docs\/2508\/catcompose","x-default":"https:\/\/zotonic.com\/docs\/2508\/catcompose"},"preview_url":null,"resource":{"version":51,"pivot_location_lat":null,"title":"catcompose","is_authoritative":true,"body":"<aside><p>See also<\/p><p><a href=\"\/id\/doc_template_tag_tag_compose\" class=\"doc-reference doc-reference-tag\"><code>tag#compose<\/code><\/a>, <a href=\"\/id\/doc_template_tag_tag_catinclude\" class=\"doc-reference doc-reference-tag\"><code>tag#catinclude<\/code><\/a> and <a href=\"\/id\/doc_template_tag_tag_block\" class=\"doc-reference doc-reference-tag\"><code>tag#block<\/code><\/a>.<\/p><\/aside>\n<p>Compose another template based on the category of a resource.<\/p>\n<p>The <code>catcompose<\/code> tag is the category-aware variant of <a href=\"\/id\/doc_template_tag_tag_compose\" class=\"doc-reference doc-reference-tag\"><code>tag#compose<\/code><\/a>. It selects the template using category lookup, like <a href=\"\/id\/doc_template_tag_tag_catinclude\" class=\"doc-reference doc-reference-tag\"><code>tag#catinclude<\/code><\/a>, and also lets the caller override named blocks in the selected template.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% catcompose &quot;_teaser.tpl&quot; id %}\n    {% block body %}\n        &lt;p&gt;Custom teaser body&lt;\/p&gt;\n    {% endblock %}\n{% endcompose %}\n<\/code><\/pre>\n<p>The selected template depends on the category hierarchy of <code>id<\/code>, using the same lookup rules as <a href=\"\/id\/doc_template_tag_tag_catinclude\" class=\"doc-reference doc-reference-tag\"><code>tag#catinclude<\/code><\/a>.<\/p>\n<h2>Arguments<\/h2>\n<p>Extra arguments can be passed to the composed template:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% catcompose &quot;_teaser.tpl&quot; id title=&quot;Summary&quot; %}\n    {% block body %}Custom teaser body{% endblock %}\n{% endcompose %}\n<\/code><\/pre>\n<p>The <code>with<\/code> keyword is optional here as well:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% catcompose &quot;_teaser.tpl&quot; id with title=&quot;Summary&quot; %}\n    {% block body %}Custom teaser body{% endblock %}\n{% endcompose %}\n<\/code><\/pre>\n<p>The resource id is also available in the composed template as <code>id<\/code>.<\/p>","slug":"catcompose","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"bbb31ccdc48674cff9b868cc3515e70718fb6c3eb90b7219c971d81461d25335","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":324,"is_a":["meta","category"],"name":"template_tag","title":"Tags","uri":"https:\/\/test.zotonic.com\/id\/324"},"doc_source_path":"doc\/template-tags\/catcompose.md","publication_start":"2026-03-27T13:48:02Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/doc\/template-tags\/catcompose.md","pivot_location_lng":null,"doc_source_kind":"template_tag","name":"doc_template_tag_tag_catcompose","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-03-27T13:48:02Z","uri":null,"doc_status":"current","is_dependent":false,"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":"66cb145eae7002b184e7d8c4c7bba5e53e8248e5\n","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-10-02T12:40:48Z","title_slug":"catcompose"},"uri":"https:\/\/zotonic.com\/id\/2508","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2508"}},"status":"ok"}