Skip to main content

Creating a Product Block

The third type of blocks in Headless CMS OneEntry is "For product block".

1. Creating a Block

To create a block of type "For product block", you need to enter the block name in the Name field, select "For product block" 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 "For product block" category.

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 product block", there are four tabs available during editing:

  • Basic data
  • Attributes
  • Categories
  • 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. Additional conditions - allows adding conditions for sorting blocks. To apply sorting, you need to activate the "Additional conditions" checkbox and select a sorting option (By name, price, and date). After that, enter the sorting values:
    • for name - enter the product name. As soon as you start typing the product name, a list of products matching the entered value will appear, from which you can select the desired product.
    • for price - two input fields: from the lower price and upper price
    • for date - also two input fields, where you need to specify the time range
      The order of selected blocks can be changed by dragging the blocks.

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.

Categories

The "Categories" tab contains a search bar

for pages
and a tree view
of pages
intended for
pages
containing products. 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 "block_product" is linked to the
page
"catalog".

Categories

Linked Pages

The "Linked pages" tab contains a search bar

for pages
and a tree view
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 to the
pages
"catalog" and "we".

Linked pages

.