Skip to main content

Outline

In this module, you will learn how to work with Blocks in Optimizely CMS. Blocks are fundamental to content management in Optimizely CMS PaaS. They are reusable content pieces that can be shared across multiple websites and maintained from a single location. This reusability is a key benefit, promoting consistency and efficiency in content creation.​

​After completing this module, you should be able to:​

  • Identify the different types of block​
  • Create and edit blocks from distinct views​
  • Manage blocks (rename, move, copy, remove)​
  • Insert blocks into content areas​
  • Manage versions, languages, and access rights for blocks
Blocks tab

Blocks types​

A block type defines a set of properties for the content within the block. Optimizely configured the types of blocks that you (as an editor) can choose. For example, in the Alloy site, you see block types for things like teasers, forms, contacts, and others.​

Typical examples of content blocks include:​

  • Campaign teasers​

  • Banners​

  • Videos​

  • News feeds​

  • Contact forms​

For pages, you can have:​

  • Editorial block​

  • Form​

  • Page listing

Block types

The block types that you see here are specifically for the Alloy sample site. Your website will have block types custom-made to your organization's need.

Manage Blocks

You manage blocks from the Blocks tab under the Assets pane where you can create new blocks and organize them into folders. You can then use blocks by dragging them into the content area of CMS pages. You can manage block versions like other types of content, and blocks can also be personalized to be displayed for a selected audience.

Moving, copying, and removing a block works similarly to pages using the context menu. Because blocks and media files share the same folders, removing a folder from the tree structure affects content within the folder. If any block or media within a folder is used on the website, you are notified about the usage before the content is moved to the trash. When a block is trashed, it’s no longer available on the site. You can restore using View Trash via Blocks gadget.

Creating a block

You can create and edit blocks in different types of views.

  • On-Page Editing or All Properties View: These views allow you to see and modify block properties, and even drag and drop images from the assets panel directly into the block.

  • Quick Edit View: This view enables you to edit a block without leaving your current context. Relevant properties are available directly in this view, and if no approval workflow is set, changes can be published immediately.

Create a block from the Blocks tab

This option lets you choose where to save the block in the block folder structure. If you save it under For All Sites or For This Site, the block is available for other pages on the website. If you save it under For This Page, it is only available on the current page. Creating a block from the assets panel will use the On-Page Editing or All Properties views.

Create a block directly from a content area

When using this option, the block is saved in the For This Page or For This Block folder for the selected page or block, which means it is not available on any other pages on the website.

Editing Blocks

You can edit blocks directly from the content area where they are being used or the Blocks tab in the assets panel. Any changes made to a block will automatically reflect across all instances where that block is used on the website. Depending on which view you are using, the system configuration, and your access rights, you have the following options:

  • In Quick edit view, save the block to return to the page, or set the block to Ready for Review, Ready to Publish, or publish your changes immediately.
  • In On-page Editing or All Properties view, set the block to Ready for Review, Ready to Publish, or publish the block immediately. In these views, you can also schedule it for later publishing.

Use blocks in content

  • Adding to Content Areas: Simply drag a block from the assets panel into a content area on a page. Valid drop zones will be indicated. You can add multiple blocks and rearrange their order.
  • Adding to Rich-Text Editor: Blocks can also be dragged and dropped into a rich-text editor area.
  • Removing Blocks: To remove a block from a content area, select Remove from its context menu.
  • Personalization: Blocks can be personalized to display targeted information to specific audiences. Personalized blocks are only visible in the edit view when a content area is selected.
  • Linking: Blocks do not have their own web address (URL), so you cannot link directly to a block. However, if a block contains a rich-text editor, you can create links to other pages and media files within it.
  • Arranging and Display Styles: You can change the display order of blocks by dragging and dropping or using Move up / Move down options. Blocks can also be displayed in different sizes and styles, either automatically or by manually selecting options like Full, Wide, or Narrow.

Versions, content languages, and access rights for blocks

  • Blocks support versioning like other content — you can view and restore versions via the Versions gadget.
  • Blocks can have language variants (if your site is multilingual).
  • You can set access rights per block (or per block folder) via All Properties or admin view.
  • It’s also possible (in code/configuration) to restrict which block types are allowed in certain content areas.

Try It Yourself

Try this interactive demo to get a better grasp of blocks: