Per Nergård
Sep 17, 2013
  2118
(0 votes)

CMS7 tool for assisting in verifying block appearance in content areas.

In CMS7 we got blocks which is great for all customers who get more flexible solutions.

Since there today isn’t any real nice solution to limit which blocks can go into a contentarea this introduces a bigger challenge for implementing the html / css and validating that everything looks fine.

Depending on the site and customer we can have page types which have none to maybe even only consist of contentareas. In combination with a lot of different blocks there are a lot of possible combinations to verify.

To make this process easier I have created a small tool. It  generates test pages of your chosen page types adding the blocks you have chosen to all contentareas.

Prerequisites:

Note if you have page types with [Required] properties you need to either temporarily remove the required attribute or maybe use the #debug preprocessor statement to set default values so the page type at least don’t crash.

  1. Create a folder in the global block folder that contains “testblocks” in it’s name. Here you create all blocks that you want to use in the tool.
  2. Below the start page create a page with “testblocks” in the name. This will be the container for where the tool creates pages.

 

The tool

  1. The first thing you need to do is choose a page type which the tool uses for generating container nodes for structuring up test pages. This type should have no limitations as to what page types can be created below it.
  2. Then you choose which blocks you want to generate test pages for.
  3. Then you choose which page types to use when generating test pages.
  4. The fourth option decides how the test pages should be generated.  Example further down in this post.

 

Overview

 

Example 1

Here we want to generate test pages for all blocks and all page types and group them by block.

Option1

Result example 1

 

Result1

Example 2

In example 2 we want to use all blocks and two page types but here we want to add all chosen blocks to each of the page types contentareas.

Option2

Result example 3

Result2_1

result2_2

It’s created as a EPiServer.SimplePage. Just download the code and drop it the site root, change the name space and compile and you’re ready to go.

I hope you find it useful. Any feedback appreciated. The code is over at the code section.

Sep 17, 2013

Comments

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024