Skip to main content

Creating a Block of Similar Products

The second type of blocks in Headless CMS OneEntry is "For block of similar products". This block is intended for products grouped by common characteristics. For example, to gather all products within a certain price range.

1. Creating a Block

To create a block of type "For block of similar products", you need to enter the block name in the Name field, select "For block of similar products" from the dropdown list in the "Type" field, and enter a unique

Marker
in the Marker field. After clicking the Add button, the block will appear in the blocks table under the category "For block of similar products".

2. Editing a Block

To edit a block, you need to click the "Edit" button in the "Actions" column of the blocks table.

Edit

For blocks of type "For block of similar products", there are three tabs available during editing:

  • Basic data
  • Attributes
  • Linked pages

Basic data

The "Basic data" tab consists of the following forms:

  1. Name - change the block name

  2. Marker - change the

    Marker
    of the block

  3. Individual settings:

    • Quantity - change the number of items in the block (only integer values are allowed)
    • Sorting type of block items - you can sort either by date or by name
    • Sorting order of block items - three options: ascending, descending, and no sorting
    • Number of items per row - change the number of items in one row of the block (only integer values are allowed)
  4. Add condition - allows adding conditions for product search. Contains the following fields:

    • Attribute - a dropdown list allowing you to select an attribute from all created sets of product attributes for the search.
    • Condition - a dropdown list allowing you to select a condition for the search. Available filters:
      • contains
      • does not contain
      • equal to
      • not equal to
      • more
      • less
      • contains any value
      • does not contain a value
      • NaN
      • the same value as the selected attribute
    • Value - an input field where you need to enter the value for the search. For example, if you want to filter all items where product_price is greater than 1000, you need to set the following condition:

    Add condition

    • Categories - necessary for selecting
      pages
      of type "Catalog" for the search based on the specified condition. Contains an input field for quick search of
      pages
      and a list of all
      pages
      . If nothing is selected, the search will be conducted across all
      pages
      of type "Catalog".
    • Buttons - actions available in the "Add condition" module:
      • Add - adds the condition
      • Reset - resets the parameters of the current condition
      • Reset all - resets the parameters of the current condition and removes previously created conditions for the current block
💡Note

To apply the condition, you need to click the Add button
Add condition

  • Added conditions - a table containing previously added conditions. Consists of 6 columns:
    • Attribute
    • Condition
    • Value
    • Category
    • Content language code
    • Condition removal buttons
  • Found products - a table containing items that match the specified condition.

Attributes

The "Attributes" tab contains two dropdown lists for selecting Template and Attribute Set.

After selecting the attribute set, you need to fill in the values. In our case, this is the attribute number, which has the type Integer. We will specify 44 as the value.

Linked pages

The Linked pages tab contains a search bar for

pages
and a tree view list of
pages
. This tab is needed to link the edited block with
pages
. To establish a link, you need to select
pages
from the list of
pages.
In the screenshot below, the block "new_block" is linked with the
pages
"catalog" and "we".

Linked pages

.