# all\_catinclude

Source: https://zotonic.com/docs/1354/all_catinclude

URI: https://zotonic.com/id/1354

Language: en



::: {.aside}
See also

tags <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_all_include" class="doc-reference doc-reference-tag"><code>tag#all_include</code></a>.
:::

Include a template for all a resource’s categories from all modules.

This is an extension on the <a href="/id/doc_template_tag_tag_catinclude" class="doc-reference doc-reference-tag"><code>tag#catinclude</code></a> tag. It will include all templates with the given name, instead of the first one found. Templates are defined in modules, because of that multiple modules can define a template with the same name.

This catinclude extension will include all available templates in the same order as defined in <a href="/id/doc_template_tag_tag_catinclude" class="doc-reference doc-reference-tag"><code>tag#catinclude</code></a>. Where the templates per category will be rendered in the order of their module’s defined priority. This is the order in which they are listed in the module admin page.

Examples of this mechanism can be found in <a href="/id/doc_module_mod_admin" class="doc-reference doc-reference-module"><code>module#mod_admin</code></a>, for example the main menu and the category specific editing fields on the edit page.

An example usage:

```django
{% all catinclude "hello.tpl" id arg="val" %}
```

Includes all templates with the base name hello.tpl for the id’s category hierarchy.

For example, in the case of a *news* article:

- all templates with the name `hello.news.tpl`
- all templates with the name `hello.article.tpl`
- all templates with the name `hello.text.tpl`
- all templates with the name `hello.tpl`

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1354?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1354?language=en>)
