تخطَّ إلى المحتوى

المفاهيم الأساسية › مكتبة القوالب

404.jinja

غير مترجمة بعدهذه الصفحة متوفرة بالإنجليزية فقط حتى الآن، وتُعرض أدناه بالإنجليزية بدل حجبها.

The page for any address the store does not serve. It is sent with status 404.

What the platform does for you

  • noindex. On this page, {% wajha_head %} writes <meta name="robots" content="noindex"> instead of a canonical URL and language alternates, so a search engine never indexes an error as a page of the store.
  • The status. The response is a real 404, whatever your template says.
  • A fallback. If your theme has no 404.jinja, the default theme's is used.

What is not yours

An address on a domain that belongs to no store — or to a store that is suspended or closed — never reaches your theme. It gets the platform's own not-found page, which names no store. That keeps anyone from using an address to discover whether a store exists.

Data

The same as every page: store, page, request, theme, t. request.path is the address that was not found, already normalised — duplicate slashes and .. segments are gone before your template sees it.

Example

{% extends "layout.jinja" %}

{% block title %}{{ t.not_found.title }} — {{ store.name }}{% endblock %}

{% block content %}
<section class="not-found">
  <p class="not-found__code" dir="ltr">404</p>
  <h1>{{ t.not_found.title }}</h1>
  <p>{{ t.not_found.body }}</p>
  <a class="button" href="/">{{ t.not_found.home }}</a>
</section>
{% endblock %}

Note dir="ltr" on the number: 404 inside an Arabic page should read left to right. See RTL & Arabic.