lektor-website/content/docs/api/db/query/limit/contents.lr

24 lines
374 B
Plaintext
Raw Normal View History

2015-12-19 14:52:17 +01:00
title: limit
---
summary: Limits the total number of items returned.
---
type: method
---
signature: offset
---
body:
The offset method can be used to limit the return value to a certain number
of matching records.
## Example
```html+jinja
<h3>Our Top 3</h3>
<ul>
{% for item in this.children.order_by('-rating').limit(3) %}
<li>{{ item.title }}
{% endfor %}
</ul>
```