# Tìm kiếm

### Các nội dung cơ bản của trang tìm kiếm

Trang tìm kiếm là trang liệt kê danh sách các tin tức theo từ khóa được tìm kiếm. Nội dung của trang sẽ giống trang danh sách tin tức. Trang tìm kiếm của 1 website cơ bản thì sẽ bao gồm các nội dung sau:

#### Các thẻ meta

```
{% extends layout_layout %}
{% block meta %}
    {% set title = getParam('q') %}
    {{ headTitle('Kết quả tìm kiếm: ' ~ title).setSeparator(' - ').setAutoEscape(false)|raw }}
    <meta name="keywords" content="Tìm kiếm">
    <meta name="description" content="Tìm kiếm">
    <link rel="canonical" href="{{ getCurrentUrl(true) }}" />
    <meta property="og:url" content="{{ getCurrentUrl(true) }}">
    <meta property="og:image" content="https://dummyimage.com/300x200/000/fff">
    <meta property="og:type" content="website">
    <meta property="og:title" content="Tìm kiếm">
{% endblock %}


```

* Phân trang

Phân trang giúp cho khách hàng có thể tìm kiếm được tin tức dễ dàng và thường sẽ được đặt ở phía cuối trang.

```
{{ render_paginator(paginator) }}
```

* List tin tức

```
{% if(paginator.currentModels is not empty) %}
    {% for art in paginator.currentModels %}
            <div>
                <a href="{{ art.viewLink }}" title="{{ art.title | raw }}">
                    <img loading="lazy" alt="{{ art.title | raw }}" src="{{ art.pictureUri }}"/>
                </a>
                <div>
                    <h4>
                       {{ art.title | raw }}
                    </h4>
                    <ul>
                        {% set time = art.createdDateTime|split(' ') %}
                        {% set date = time[0]|split('-') %}
                        <li><time>{{ date[2] }}/{{ date[1] }}/{{ date[0] }}</time></li>
                        <li><div class="fb-like" data-href="{{ art.viewLink}}" data-layout="button_count" data-action="like"></div></li>
                    </ul>
                    {{ art.intro(true) | raw }}
                </div>
            </div>
    {% endfor %}

    {{ render_paginator(paginator) }}

{% endif %}
```


---

# Agent Instructions: 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://webdocs.nhanh.vn/page/tin-tuc/tim-kiem.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.
