lektor-website/content/docs/api/db/system-fields/model/contents.lr
David Baumgold 10296444df Close <li> tags
Because valid HTML is better than invalid HTML
2016-07-22 11:47:12 -04:00

24 lines
532 B
Markdown

title: _model
---
summary: The model the record uses for its fields.
---
type: sysfield
---
body:
This field selects the model that should be used for non-system fields. In
many situations the model is picked automatically but for equally many
situations it needs to be selected manually.
This field is most useful for filtering when operating on mixed collections.
## Example
```html+jinja
<ul class="projects">
{% for child in this.children.filter(F._model == 'project') %}
<li>{{ child.name }}</li>
{% endfor %}
</ul>
```