# Como ele é utilizado nos temas

O Twig é utilizado em nossos temas para que seja possível incluir informações e códigos PHP nas páginas HTML, utilizando uma sintaxe simples e intuitiva, com isso facilitando a criação dos templates nos temas e garantindo maior velocidade quando comparado ao código PHP puro.

Segue um exemplo de sua utilização:

Entrada:

```twig
<ul>
	{% for brand in brands %}
	  <li><a href="{{ brand.url }}">{{ brand.name }}</a></li>
	{% endfor %}
</ul>w
```

Saída:

```html
<ul>
	<li><a href="http://url_brand_1.com">Brand 1</a></li>
	<li><a href="http://url_brand_2.com">Brand 2</a></li>
	<li><a href="http://url_brand_3.com">Brand 3</a></li>
</ul>
```

Nossos layouts são organizados em uma estrutura de pastas e arquivos e mesmo utilizando twig, os arquivos devem ser salvos na extensão .html

Para mais detalhes acesse o artigo:&#x20;

{% content-ref url="/pages/w3OkauiCosW68Da6T7Lz" %}
[Estrutura do Tema](/themes/construindo-seu-template/visao-geral/estrutura-do-tema.md)
{% endcontent-ref %}


---

# 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://partners.tray.com.br/themes/construindo-seu-template/twig/como-ele-e-utilizado-nos-temas.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.
