[[block-create-custom]] === Creating A Custom Block ==== Goal You can create a block showing the opening hours and the location of the Farmer's market and place it in the sidebar of the website. ==== Prerequisite knowledge * <> * <> ==== Site prerequisites You need to have a role that has been granted the "Administer Blocks" permission. See <> ==== Steps Create a block showing the opening hours and the location and place it in the Sidebar Second region. . Open the _Block layout_ page via Structure > Block layout (admin/structure/block) . Click _+Add custom block_. The _Add custom block_ page appears. . Fill in the fields as shown below. [width="100%",frame="topbot",options="header"] |================================ |Field name | Value |Block description | Opening hours and location block |Body | Open: Sundays, 9 AM to 2 PM, April to September
Location: Parking lot of Trust Bank, 1st & Union, downtown Anytown. |================================ // Go to block/add image:images/block-create-custom-add-custom-block.png ["Add a custom block"] [start=4] . Click _Save_. The block will be saved. The block configuration form will appear. . Fill in the fields as shown below. [width="100%",frame="topbot",options="header"] |================================ |Field name | Value |Title | Opening hours and location |Display title | Checked |Cache settings, maximum age|Forever |Region|Sidebar Second |================================ // Go to block/add, enter field values & click Save image:images/block-create-custom-configure-block.png [Configure a custom block] [start=6] . Click _Save block_. The block configuration will be saved. The_Block layout_ page will appear. . Click _Save blocks_. . Click _Back to site_ in the toolbar to verify that the block has been added to the sidebar. If the block doesn't immediately appear in the appropriate region it may be cached. You can either wait for the cache to be refreshed or open the _Performance_ page via Configuration > Performance (admin/config/development/performance) and click _Clear all caches._ ==== Follow-on tasks All custom blocks appears in the _Custom block library_, which is accessible by navigating to the Block layout page and clicking on the _Custom block library_ link at the top of the section. Once on the page find your custom block and click the edit link to the right of the Block description. Similar to editing content you may choose to save a revision of your block. ==== Additional resources * https://www.drupal.org/documentation/modules/block[Working with blocks (content in regions)]