المفاهيم الأساسية › مكتبة القوالب
home.jinja
غير مترجمة بعدهذه الصفحة متوفرة بالإنجليزية فقط حتى الآن، وتُعرض أدناه بالإنجليزية بدل حجبها.
The store's homepage, served at /.
Data
| Name | Useful here |
|---|---|
store | name in the page's language, name_ar, name_en, currency |
request | locale, direction, other_locale_url for a language switch |
t | Your theme's strings |
theme | asset_base, for images in your theme's assets/ |
The homepage is also where the platform writes the store's structured data — the store's
name in both languages and its address — through {% wajha_head %}. You do not write it.
sections is the layout the merchant saved in the Theme Editor, or your schema's presets.home
until they save one. Hidden sections are left out before your template runs.
Example
{% extends "layout.jinja" %}
{% block content %}
<section class="hero">
<p class="hero__eyebrow">{{ t.home.eyebrow }}</p>
<h1 class="hero__title">{{ store.name }}</h1>
<p class="hero__lede">{{ t.home.lede }}</p>
</section>
{% endblock %}
store.name is never empty: when the merchant gave a name in only one language, it is used
in both. Test your hero with a long Arabic name and a long English one — store names are often
several words, and a heading that fits Elite may not fit متجر النخبة للأزياء النسائية.