Skip to content
Snippets Groups Projects
Commit 238bec4b authored by Ivan Abramenko's avatar Ivan Abramenko
Browse files

Issue #3049648: [RU] Перевод: views-block.txt

parent 5cd89278
No related branches found
No related tags found
No related merge requests found
[[views-block]]
=== Adding a Block Display to a View
=== Добавление Отображения блока для Представления
[role="summary"]
How to add a block display to a view.
Как добавить Отображение блока для Представления
(((View,adding block display to)))
(((Block,creating from a view)))
(((Views module,adding to a view)))
(((Module,Views)))
(((Представление,добавление отображения блока для)))
(((Блок,создание из представления)))
(((Views модуль,добавление представления)))
(((Модуль,Views)))
==== Goal
==== цель
Add a block display to the Recipes view to display the most recent recipes
in a sidebar, and change its configuration without changing the existing
Recipes page view.
Добавить отображение блока в представление Рецепты для отображения последних рецептов
в колонке и изменить его конфигурацию без изменения существующей
страницы отображения Рецептов.
==== Prerequisite knowledge
==== Необходимые знания
* <<views-concept>>
* <<views-parts>>
* <<views-create>>
==== Site prerequisites
==== Требования к сайту
* The Recipe content type must exist, it must have a Main image field, and your
site must have a couple of Recipe content items. See <<structure-content-type>>,
<<structure-fields>>, <<structure-form-editing>>, and <<content-create>>.
* Тип материала Рецепт должен быть создан, он должен иметь поле Главного изображения и ваш
сайт должен иметь пару страниц Рецептов. Смотрите <<structure-content-type>>,
<<structure-fields>>, <<structure-form-editing>> и <<content-create>>.
* The _Thumbnail (100x100)_ image style must be defined. This is created on your
site when you install the core Image module (installed with the core Standard
installation profile) but can be recreated if deleted. See
* Стиль изображения _Миниатюра (100x100)_ должен быть определен. Он создается на вашем
сайте, когда вы устанавливаете модуль ядра Image (устанавливается при стандартном
установочном профиле), однако можно пересоздать его если он был удален ранее. Смотрите
<<structure-image-style-create>>.
* The Recipes view must exist. See <<views-create>> and <<views-duplicate>>.
* Представление Рецепты должно быть создано. Смотрите <<views-create>> и <<views-duplicate>>.
==== Steps
==== Шаги
. In the _Manage_ administrative menu, navigate to _Structure_ > _Views_
(_admin/structure/views_). Find the view "Recipes" and click _Edit_ from its
dropdown button. Alternatively, navigate to the Recipes page in the main site
navigation, and click the _Edit view_ contextual link in the main area of the
page. See <<config-overview>> for information about contextual links.
. В меню администратора _Управление_, перейдите в _Структура_ > _Представления_
(_admin/structure/views_). Найдите представление "Рецепты" и нажмите _Редактировать_ в
выпадающем списке-кнопке. Или по другому, перейдите на страницу Рецепты и в главном меню
сайта нажмите _Редактировать представление_ в контекстуальной ссылке в главном регионе
страницы. Смотрите <<config-overview>> для большей информации о контекстуальных ссылках.
. Create a new block display by clicking _Add_ under _Displays_. Click
_Block_ from the list of links that appears. The new display is created, and the
focus is automatically switched to its configuration.
. Создайте новое отображение блока, нажав _Добавить_ в _Отображения_. Нажмите
_Блок_ в списке ссылок, которые появятся. Новое отображение будет создано, и
фокус переключится автоматически на конфигурацию этого отображения.
+
--
// Add display button on Recipes view edit page, with Block highlighted
// (admin/structure/views/view/recipes).
image:images/views-block_add-block.png["Add block display"]
image:images/views-block_add-block.png["Добавить отображение блока"]
--
. To change the title of this display, click _Block_ in the _Display
name_ field. The _Block: The name and the description of this display_ pop-up
appears. Change the _Administrative name_ to "Recent recipes". Click _Apply_.
. Чтобы изменить заголовок отображения, нажмите _Блок_ в поле _Имени
отображения_. Появится всплывающее окно _Блок: название и описание этого отображения_
. Измените _Административное имя_ на "Недавние рецепты". Нажмите _Применить_.
. To change the title of the block, click Recipes in the _Title_ field
under _Title_. In the pop-up that appears, select _This block (override)_ from
the _For_ select list. Change the _Title_ field to "New recipes" and click
_Apply (this display)_.
. Чтобы изменить заголовок блока, нажмите Рецепты в поле _Заголовок_
в разделе _Заголовок_. Во всплывающем окно выберите _Этот блок (переопределить)_ из
списка _Для_. Измените поле _Заголовок_ на "Новые рецепты" и нажмите
_Применить (это отображение)_.
+
--
// Configuring the block title for this display only.
image:images/views-block_title.png["Title only for this block"]
image:images/views-block_title.png["Заголовок только для этого блока"]
--
. To change the block's style, click _Grid_ in the _Format_ field under
_Format_. In the pop-up that appears, select _This block (override)_ from the
_For_ select list. Select _Unformatted list_ and Click _Apply (this
display)_. You can further configure the style options in the next pop-up that
appears. Then click _Apply_.
. Чтобы изменить стиль блока, нажмите _Сетка_ для настройки _Формат_ в разделе
_Формат_. Во всплывающем окне выберите _Этот блок (переопределить)_ из списка
_Для_. Выберите _Неформатированный список_ и нажмите _Применить (к этому
отображению)_. Вы можете в дальнейшем настроить стиль в следующем всплывающем окне, которое
появится. Тогда нажмите _Применить_.
. To configure the image field, click _Content: Main image_ under _Fields_.
In the pop-up that appears, select _This block (override)_ from the
_For_ select list. Select _Image style Thumbnail (100x100)_. Click _Apply
(this display)_.
. Чтобы настроить поле изображения, нажмите _Содержимое: Главное изображение_ в _Полях_.
Во всплывающем окне, которое появится, выберите _Этот блок (переопределить)_ из списка
_Для_. Выберите _Стиль изображения Миниатюра (100x100)_. Нажмите _Применить
(это отображение)_.
+
--
// Configuring the image field for this display only.
image:images/views-block_image.png["Image to thumbnail",width="100%"]
--
. To remove ingredients as a filter, click _Content: Ingredients (exposed)_
under _Filter criteria_. In the pop-up that appears, select _This
block (override)_ from the _For_ select list. Click _Remove_ at the bottom.
. Чтобы удалить ингредиенты из фильтров, нажмите _Содержимое: Ингредиенты (расширенные)_
в _Критериях фильтрации_. Во всплывающем окне выберите _Этот
блок (переопределить)_ из списка _Для_. Нажмите _удалить_ внизу окна.
. To configure how you want the content to be sorted in the view, click _Add_
from the dropdown button under _Sort criteria_. In the pop-up that appears,
select _This block (override)_ from the _For_ select list. Check
_Authored on_ (in the _Content_ category), and then click _Add and configure
sort criteria_.
. Чтобы настроить то, как вы хотите сортировать в отображении, нажмите _Добавить_
из выпадающего списка-кнопки в _Критериях фильтрации_. Во всплывающем окно
выберите _Этот блок (переопределить)_ из списка _Для_. Отметьте
_Время создания_ (в категории _Содержимое_) и тогда нажмите _Добавить и настроить
критерий сортировки_.
. In the appearing configuration pop-up, select _Sort descending_ to have the
most recent recipes appear first. Click _Apply_.
. В появившемся окне конфигурации выберите _Сортировать по убыванию_, чтобы
самые последние рецепты появлялись вначале. Нажмите _Применить_.
. To specify the number of items to be displayed, click _Mini_ in the _Use
pager_ field under _Pager_. In the pop-up that appears, select _This block
(override)_ from the _For_ select list. Under _Pager_, select _Display a
specified number of items_. Click _Apply (this display)_. In the _Block: Pager
options_ pop-up, provide "5" as the value for _Items to display_. Click _Apply_.
. Для определения числа элементов, которые будут отображены, нажмите _Мини_ в поле _Использовать постраничный
навигатор_ в разделе _Постраничный навигатор_. Во всплывающем окне выберите _Этот блок
(переопределить)_ из списка _Для_. В разделе _Постраничный навигатор_ выберите _Отображать указанное
количество элементов_. Нажмите _Применить (это отображение)_. Во всплывающем окне _Блок: Параметры постраничного
навигатора_, поставьте "5" для поля _Элементов на страницу_. Нажмите _Применить_.
. Click _Save_. You will either see the view editing page again, or the Recipes
page, depending on what you did in step 1. You should also see a message saying
that the view has been saved.
. Нажмите _Сохранить_. Вы увидите редактирование представления снова или страницу Рецептов,
в зависимости от того, что вы сделали на шаге 1. Вы также увидите сообщение о том,
что представление было сохранено.
+
--
// View saved confirmation message.
image:images/views-block_recipes.png["Summary page after configuration",width="100%"]
--
. Place the "Recipes: Recent Recipes" block in the _Sidebar second_ region. See
<<block-place>>. Navigate to the site's home page to see the block.
. Разместите блок "Рецепты: Недавние Рецепты" в регионе _Вторая колонка_. Смотрите
<<block-place>>. Перейдите на главную страницу, чтобы посмотреть блок.
+
--
// Home page with recipes sidebar visible.
image:images/views-block_sidebar.png["New Recipes block on homepage",width="100%"]
image:images/views-block_sidebar.png["Новый блок Рецепты на главной странице",width="100%"]
--
// ==== Expand your understanding
......@@ -124,7 +124,7 @@ image:images/views-block_sidebar.png["New Recipes block on homepage",width="100%
// ==== Related concepts
==== Videos
==== Видео
// Video from Drupalize.Me.
video::https://www.youtube-nocookie.com/embed/xrnuekARwYc[title="Adding a Block Display to a View"]
......@@ -132,10 +132,12 @@ video::https://www.youtube-nocookie.com/embed/xrnuekARwYc[title="Adding a Block
//==== Additional resources
*Attributions*
*Авторы*
Written and edited by https://www.drupal.org/u/lolk[Laura Vass] at
Написано и отредактировано https://www.drupal.org/u/lolk[Laura Vass] из
https://pronovix.com/[Pronovix],
https://www.drupal.org/u/jhodgdon[Jennifer Hodgdon], and
https://www.drupal.org/u/jojyja[Jojy Alphonso] at
https://www.drupal.org/u/jhodgdon[Jennifer Hodgdon] и
https://www.drupal.org/u/jojyja[Jojy Alphonso] из
http://redcrackle.com[Red Crackle].
Переведено https://www.drupal.org/u/levmyshkin[Абраменко Иван].
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment