diff --git a/cms-layouts.md b/cms-layouts.md index 1de4ff86..6ec2f4ad 100644 --- a/cms-layouts.md +++ b/cms-layouts.md @@ -1,15 +1,15 @@ # CMS Layouts -- [Introduction](#introduction) -- [Placeholders](#placeholders) -- [Dynamic layouts](#dynamic-layouts) +- [Введение](#introduction) +- [Заполнители](#placeholders) +- [Динамические макеты](#dynamic-layouts) Layouts define the page scaffold, that is everything that repeats on a page, such as a header and footer. Layouts often contain the HTML tag as well as the HEAD, TITLE and BODY tags. - -## Introduction + +## Введение -Layout templates reside in the **/layouts** subdirectory of a theme directory. Layout template files should have the **htm** extension. Inside the layout file you should use the `{% page %}` tag to output the page content. Simplest layout example: +Шаблоны компоновки находятся в подкаталоге **/layouts** каталога **theme**. Файлы шаблонов макетов должны иметь расширение **htm**. Внутри файла макета вы должны использовать тег `{% page %}` для вывода содержимого страницы. Простейший пример макета:
@@ -17,14 +17,14 @@ Layout templates reside in the **/layouts** subdirectory of a theme directory. L -To use a layout for a [page](pages) the page should refer the layout file name (without extension) in the [Configuration](themes#configuration-section) section. Remember that if you refer a layout from a [subdirectory](themes#subdirectories) you should specify the subdirectory name. Example page template using the default.md layout: +Чтобы использовать макет [страницы](./cms-pages.md), страница должна указывать имя файла макета (без расширения) в разделе [Конфигурация](./cms-themes.md#configuration-section). Помните, что если вы ссылаетесь на макет из [подкаталога](./cms-themes.md#subdirectories), вы должны указать имя подкаталога. Пример шаблона страницы с использованием макета default.md: url = "/" layout = "default" ==Hello, world!
-When this page is requested its content is merged with the layout, or more precisely - the layout's `{% page %}` tag is replaced with the page content. The previous examples would generate the following markup: +Когда эта страница запрашивается, ее содержимое объединяется с макетом, или, точнее, - тег `{% page %}` макета заменяется содержимым страницы. Предыдущие примеры генерировали бы следующую разметку: @@ -32,9 +32,9 @@ When this page is requested its content is merged with the layout, or more preci -Note that you can render [partials](partials) in layouts. This lets you to share the common markup elements between different layouts. For example, you can have a partial that outputs the website CSS and JavaScript links. This approach simplifies the resource management - if you want to add a JavaScript reference you should modify a single partial instead of editing all the layouts. +Обратите внимание, что вы можете визуализировать [чанки](./cms-partials.md) в макетах. Это позволяет вам совместно использовать общие элементы разметки между различными макетами. Например, у вас может быть часть, которая выводит ссылки CSS и JavaScript на сайте. Этот подход упрощает управление ресурсами - если вы хотите добавить ссылку на JavaScript, вы должны изменить один частный, а не редактировать все макеты. -The [Configuration](themes#configuration-section) section is optional for layouts. The supported configuration parameters are **name** and **description**. The parameters are optional and used in the back-end user interface. Example layout template with a description: +Раздел [Конфигурация](./cms-themes.md#configuration-section) является необязательным для макетов. Поддерживаемые параметры конфигурации - это имя (**name**) и описание (**description**). Параметры являются необязательными и используются в пользовательском интерфейсе. Пример шаблона макета с описанием: description = "Basic layout example" == @@ -44,10 +44,10 @@ The [Configuration](themes#configuration-section) section is optional for layout