[[block-place]]

=== Placing a Block in a Region

[role="summary"]
How to place a block in a region.

(((Block,placing in a region)))
(((Region,placing a block in)))

==== Goal

Place the Opening hours and location block in the website's sidebar.

==== Prerequisite knowledge

<<block-concept>>

==== Site prerequisites

* The core Bartik theme must be installed and set as default. See
<<config-theme>>.

* The Opening hours and location block must exist. See <<block-create-custom>>.

==== Steps

. In the _Manage_ administrative menu, navigate to _Structure_ > _Block layout_
(_admin/structure/block_). The _Block layout_ page appears, listing the theme's
regions.

. Ensure that in the secondary tab the core Bartik theme is selected. Block
placement is defined per theme.

. Locate the region _Sidebar second_ in the list and click _Place block_ next to
it. The _Place block_ window appears, listing all the blocks.

. Locate the block Opening hours and location and click _Place block_ next to
it. The _Configure block_ window appears. Fill in the fields as shown below.
+
[width="100%",frame="topbot",options="header"]
|================================
|Field name |Explanation |Example value
|Title |Title to be displayed for the block |Hours and location
|Display title |Whether or not to display the title with the block |Checked
|Region |Which theme region to display it in |Sidebar second
|================================
+
You can also hide or display the block on specific pages. In the case of the
Farmer's market website you do not set any of these configuration options
because you want to show the block everywhere.
+
--
// Configuration page for placing a custom block in the sidebar.
image:images/block-place-configure-block.png["Block configuration page",width="100%"]
--

. Click _Save block_. The _Block layout_ page appears. You can drag blocks to
change the order in which they will appear.

. Verify that the Opening hours and location block is listed in the _Sidebar
second_ region, and click _Save blocks_.
+
The block has been placed on the sidebar of all pages that use the core Bartik
theme.
+
--
// About page with placed sidebar block.
image:images/block-place-sidebar.png["Page with a block placed on the Sidebar second region",width="100%"]
--

==== Expand your understanding

* Remove the _Powered by Drupal_ block from the _Footer fifth_ region by setting
the region to _- None -_.

* Remove the _Tools_ block from the _Sidebar first_ region by setting the
region to _- None -_. This block is only visible to logged-in users.

* Place the _User login_ block in a region.

* If you do not see the effect of these changes in your site, you might need
to clear the cache. See <<prevent-cache-clear>>.


//==== Related concepts

//==== Additional resources


*Attributions*

Written and edited by https://www.drupal.org/u/batigolix[Boris Doesborg]
and https://www.drupal.org/u/jhodgdon[Jennifer Hodgdon].
