ssossossosso
Documentation Home »User Guide »Content Blocks
current version

Content BlocksΒΆ

Content Blocks are the foundation of your site and they can help create a custom layout. In Oro applications, you can modify the existing content blocks, or create your own.

Note

Creating a new content block requires developers’ assistance. As a sample, use Home Page Slider content block, the code and configuration in yaml file that help embedd it into the website homepage.

To edit a defined content block:

  1. Navigate to Marketing > Content Blocks in the main menu.

  2. Click at the end of the content block you wish to edit, and click to open the selected block for editing.

    The following page opens:

  3. In the General tab, you can amend the following fields:

    • Owner: The owner of the content block.
    • Alias: The unique identifier that can be used in the layout to render a block.
    • Titles: Localized block title.

    Note

    To enable/disable the content block, select/clear the Enabled check box.

  4. In the Restrictions section, you can specify or edit visibility restrictions for the content block.

    By default, the content block is displayed for any localization, on any website, and for any customer. To make OroCommerce apply a content block to the front store only for the particular combination of these facts, create a restriction by selecting all or some of the following: target localization, website, and customer or customer group.

    Note

    Only one field must be chosen for customers at a time, either a customer group and a customer.

  1. In the Content Variants section, you can add (click Add Content) or remove (click ) various content variants for the content block. Once you add more than one content variant, you will have to apply restrictions to any non-default variants. These restrictions help you set up the conditions where content should override the default option.

    Warning

    Never leave the restrictions for non-default variant empty. This may cause unexpected priority collision between the default and non-default variant.

    Note

    Only one field must be chosen for customers at a time, either a customer group and a customer.

For instance, you can set the content block to have a specific text displayed for Non-authenticated Visitors. For that:

  1. Set visibility restrictions to Non-authenticated Visitors in Restrictions > Customer Groups.
  2. Add a new content variant by clicking Add Content in the Content Variant section.
  3. Enter text.
Browse maintained versions:
current1.4