> For the complete documentation index, see [llms.txt](https://tabbli.gitbook.io/tabbli/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tabbli.gitbook.io/tabbli/working-with-sites/working-with-records-lists.md).

# Working with records lists

Tabbli provides generic macroses which you can use for building most common interfaces.

```markup
{% set result = DB(request)
    .get_collection(
        'students', 
        records_per_page=20, 
        use_page_number_param='page').get_filtered_records() %}
{% from "BASE:macroses/collections.html" import 
    filters_block, paginator with context %}

<div class="row">
    <div class="col-lg-3">
        <form method="get">
            {{ filters_block(result.filters) }}
            
            <button type="submit" class="btn btn-primary">
                Search
            </button>
        </form>
    </div>
    <div class="col-lg-9">
        {% for rec in result.records %}
            <div class="card mb-4">
                <div class="card-body">
                    <a href="/students/{{ rec.key }}/">{{ rec }}</a>
                    
                    <p>
                        {% with r_dict=rec.get_dict(include_related=['classes']) %}
                        <ul>
                            {% for c_dict in r_dict.properties.classes %}
                            <li>{{c_dict.name.en}} : {{c_dict.properties.teacher.name.en}}</li>
                            {% endfor %}
                        </ul>
                        {% endwith %}
                    </p>
                </div>
            </div>
        {% else %}
            <div class="alert alert-info">No records found</div>
        {% endfor %}
        
        {% if result.show_paginator %}
            {{ paginator(result) }}
        {% endif %}
    </div>
</div>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tabbli.gitbook.io/tabbli/working-with-sites/working-with-records-lists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
