DEV Community

Cover image for Content Blocks in OneEntry: Structure, Logic, and Ultimate Flexibility
OneEntry
OneEntry

Posted on

Content Blocks in OneEntry: Structure, Logic, and Ultimate Flexibility

Effective content management is a crucial element of the digital strategy for modern companies. While creating the OneEntry platform, we developed a system called Content Blocks, which allows content to be structured and managed flexibly, logically, and conveniently.

In traditional CMS approaches, content is often stored as a single text field or rigid, predefined structures, complicating support, scaling, and adaptation to evolving business needs. Unlike this approach, OneEntry represents content as separate blocks, each with clearly defined structures and attributes. This makes content reusable, simplifies personalization, and enables editors to independently build and manage pages without continuously relying on developers.

In this article, we will explain in detail how the Content Blocks system is structured, how it operates, and illustrate its capabilities through practical examples.

Block Structure: Order Instead of Chaos

The block-based content structure in OneEntry is built around a system of components, each defined by its own logic and set of attributes. These components function similarly to building blocks, allowing you to construct pages of varying complexity rather than being limited to simple text descriptions.

The platform provides the following types of blocks:

  • Simple Blocks are basic elements, such as text fragments, standalone images, or videos. They enable quick and straightforward placement of primary content onto pages.

  • Composite Blocks combine multiple elements into a cohesive group, both visually and contextually—for example, photo galleries, product listings, or informational cards describing services.

  • Dynamic Blocks pull and display content automatically based on predefined conditions or relationships with other elements. Examples include automatically generated product selections, recommended articles, or embedded content from external sources.

Diagram illustrating the concept of Content Blocks in OneEntry

Using this structure enables quicker responses to changes and simplifies the adaptation of pages to new requirements, while maintaining a consistent style and a user-friendly experience.

Product Block Details

Above, we discussed the general structure of blocks in OneEntry and identified their main types. Now, let’s move on to specific examples and explore some of the most frequently used blocks in detail. One such example is the Product Block, specifically designed for displaying product-related content on your website.

Unique features of the Product Block:

  • Catalog Integration: Information is automatically retrieved directly from product cards, helping to avoid errors and duplication, ensuring the displayed content is always up-to-date.

  • Attribute-based Customization: You can independently determine which product fields and characteristics will be shown to the user (for example, displaying only images and prices without detailed descriptions).

  • Display Logic: Integration with dynamic blocks (such as the "Similar Products" block) allows automatic generation of product selections based on your specified criteria, including categories, tags, price ranges, and other attributes.

Understanding the “Similar Products Block”

The next block type we will discuss is the Similar Products Block, designed to display products that may interest the user and meet the criteria you specify.

Content Blocks in OneEntry

Unique features of the Similar Products Block:

  • Automatic Selection: The platform automatically selects products based on predefined parameters, such as price range, category, or other attributes, and displays them within the block.

  • Customizable Selection: You can finely tune product selection based on specific attributes, as well as manually manage the selection by applying exclusions or prioritizing particular products for display.

Integrating Blocks into the Complete Workflow

Both block types described above can be integrated into pages or product entities. First, you create the block using the visual interface of the platform, then define the required attributes and display rules, and finally, insert the prepared block into the desired entities.

When the page loads, the frontend application requests the necessary block via the SDK or directly through the platform’s API, using a specific marker or block identifier. In response, the application receives the complete block structure, including all fields and logic you’ve defined.

For example:

const block = await sdk.Blocks.getBlockByMarker("similar_products");
console.log(block.attributes); // -> [{name:"priceMin", value:100}, ...]
const products = await sdk.Blocks.getBlocks("product_block");
Enter fullscreen mode Exit fullscreen mode

What Business Challenges Does the Content Blocks Approach in OneEntry Solve?

Using the block-based structure in OneEntry helps address several common challenges that companies often face in content management:

  • Reducing Dependency on Developers: Editors and content managers can independently modify the structure and content of pages without constantly involving the IT department.

  • Consistency of Design and Content: Thanks to clearly defined structures and block types, maintaining a consistent style becomes easier, preventing situations where pages appear disconnected or inconsistent.

  • Faster Launch of New Projects: Creating new pages or marketing campaigns becomes significantly faster because all required elements can be easily assembled from pre-defined blocks.

  • Simplifying Personalization: Built-in tools for conditional content display allow effortless adaptation of pages to different audience segments.

  • Ease of Scalability: Content management remains straightforward and transparent, regardless of the website’s size or structural complexity, significantly simplifying project growth.

Practical Scenarios for Using Blocks

Using content blocks is especially valuable for tasks such as:

  • Creating landing and product pages: Easily build pages with detailed presentations of products or services, quickly adapting them for specific tasks or promotional campaigns.

  • Publishing blogs and news feeds: Rapidly create regular content with a structured approach, ensuring a consistent design throughout.

To make working with blocks as effective as possible, consider these straightforward recommendations:

  • Plan your page structure in advance.
  • Avoid excessive nesting of blocks, maintaining simplicity and readability.
  • Use conditional logic and advanced rules only when clearly justified and necessary for achieving specific goals.

If you’d like to explore content blocks further, feel free to review our block documentation, watch a demonstration video, or try out the platform yourself on our Free license.

Thank you for your attention!

Top comments (0)