Skip to content

Latest commit

 

History

History
82 lines (52 loc) · 3.73 KB

block-add.md

File metadata and controls

82 lines (52 loc) · 3.73 KB
title redirect_to
Adding New Blocks

Custom blocks of content can be created, and then added to any page, group of pages, or even to another block. For example, you might place an image slider in a block, and then place the block on the home page. The Blocks workspace uses the same [basic controls]({% link cms/pages-workspace.md %}) as the Pages workspace to help you find available blocks and perform routine maintenance. When the block is complete, you can use the [Widget]({% link cms/widget-static-block.md %}) tool to place it on specific page(s) in your store.

![The Blocks page displays a grid of existing blocks]({% link cms/assets/blocks-workspace.png %}){: .zoom} Blocks page

Create a block

  1. On the Admin sidebar, go to Content > Elements > Blocks.

  2. In the upper-right corner, click Add New Block.

    ![The New Block page displays options and a content space]({% link cms/assets/block-detail.png %}){: .zoom} Block detail information

  3. If you want to change the default enabled status of the new block, set Enable Block to No.

  4. Assign a Block Title for internal reference.

  5. Assign a unique Identifier for the block.

    Use all lowercase characters with underscores instead of spaces.

  6. Select each Store View where you want the block to be available.

  7. Add the content for the block using the displayed content tool set:

    • If [Page Builder]({% link cms/page-builder.md %}) is enabled, the content [workspace]({% link cms/page-builder-workspace.md %}) includes the Page Builder tools.

      ![]({% link cms/assets/pb-workspace-block.png %}){: .zoom} Page Builder workspace

      {:.bs-callout-info} For information about adding blocks with Page Builder, see [Tutorial 2: Blocks]({% link cms/page-builder-tutorial2-blocks.md %}).

    • Use the [editor]({% link cms/editor.md %}) to format text, create links, and add tables, images, video, and audio.

      If you prefer to work with HTML code, click Show / Hide Editor.

      ![]({% link cms/assets/block-editor-hidden.png %}){: .zoom} Block editor (hidden)

  8. When complete, click the Save arrow and choose Save & Close.

    ![The Save menu displays a Save and Close option]({% link cms/assets/cms-new-block-save-and-close.png %}){: .zoom} Choosing the Save & Close option

    The new block appears at the bottom of the list in the Blocks grid.

  9. Use the [Widget]({% link cms/widget-static-block.md %}) tool to place the completed block on a specific page in your store.

Delete a block

There are two ways to remove created block. You can remove it from Blocks grid, or from the edit block page.

Method 1: Remove a block from the Blocks grid

  1. On the Admin sidebar, go to Content > Elements > Blocks.
  2. Locate the blocks using filters above the grid and select the checkbox for one or more blocks to be deleted.
  3. In the upper-left corner of the list, set Actions to Delete.
  4. To confirm the action, click OK.

Method 2: Remove a block from the edit page

  1. On the Admin sidebar, go to Content > Elements > Blocks.
  2. Find the block to be deleted.
  3. In the Actions column for the block, click Select and choose Edit.
  4. In the menu bar click Delete Block.
  5. To confirm the action, click OK.

Save menu

| Command | Description | |---------- | Save | Save the current block and continue working. | | Save & Duplicate | Save and close the current block, and open a new duplicate copy. | | Save & Close | Save and close the current block, and return to the Blocks grid. |