> For the complete documentation index, see [llms.txt](https://learn.vispeahen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.vispeahen.com/raporlama/sablon-tasarimi/2-beforerow-mekanizmasi-ve-donguler.md).

# 2) beforerow Mekanizması ve Döngüler

Bir satırın döngü içinde kaç kez üretileceği, o satırın ilk hücresine eklenen Excel Comment'i ile belirlenir. Comment metni "`beforerow`" anahtar kelimesiyle başlar; devamındaki `Jinja` döngü etiketi render sırasında o satırın hemen üstüne eklenir. Bu sayede Excel'deki tek bir satır, veri setine göre otomatik olarak çoğaltılır.

<figure><img src="https://3143653407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0vZHisAf5833eglFw2GE%2Fuploads%2Fd9gdnfuvLGnOKaL10CzY%2FResim7.png?alt=media&amp;token=cc2f5113-1c0d-457e-84ec-a8a9698cf8f1" alt=""><figcaption><p align="center"><em>beforerow mekanizması: v0 şablonundaki hücre comment'leri ve render sonrasında üretilen çıktı satırları. Sarı hücreler döngüde tekrar eder, mor hücre bir kez üretilir.</em></p></figcaption></figure>

{% hint style="warning" %} <mark style="color:$warning;">**Kritik Kural:**</mark> Döngü açan `{% for %}` ve döngü kapatan `{% endfor %}` ifadeleri farklı satırların comment'lerinde bulunabilir. Aradaki tüm satırlar her iterasyonda bir kez üretilir. Bu sayede, aynı şehir-kategori kombinasyonu için birden fazla veri satırı çıkartılabilir.
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://learn.vispeahen.com/raporlama/sablon-tasarimi/2-beforerow-mekanizmasi-ve-donguler.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
