Now reading Writing interesting stuff for creative people

Widget Corner #2

Template widget

 

Within the Ektron CMS there are two distinct ways in which a CMS user can add a page to the site. The simplest (and the original mechanism) is to add a Content Block item to a content folder. The folder has associated with it one or more templates. Adding the content block to the folder binds the content to the template to create a page; strictly speaking a virtual page. 

Perhaps the easiest way to see what is going on is to look at the URL such a page is given before aliasing is applied. In Ektron parlance this is called the Quicklink and a typical Quicklink for say a news page would be:

www.website.com/news/newstemplate.aspx?id=2345

Each new news item would have a different id and so another news article might have the Quicklink

www.website.com/news/newstemplate.aspx?id=2389

Each page is in effect a template containing a piece of dynamic content. The template itself might contain other elements such as menus or even static pieces of content but the design of the template is essentially fixed. The only differences between these two pages would be the content item itself, most probably in the main content well of the page. 

Each folder in the CMS can have one or more such Templates associated with it. One of these is always the default template and is used to create the virtual page unless the user specifies otherwise.

I mentioned that there are two ways to add a page to the site. The other is using Page Builder. In this case the user first creates a new page based on a Page Builder template. This contains just the basic page layout and the user can add widgets, however many he needs, and place them on the page into dropzones using drag and drop. At least one such widget will be a Content Block widget. Once placed on the page, the user would need to configure the content widget to point it at a piece of content.

The problem with the template mechanism is that all the pages look the same, they all have the same elements except for the main piece of content. On the other hand, the problem with using page builder is that each page has to be created using a two-step process, first create the content item and then create the page with the widget that points to that content item.

It would be nice if we could combine these two page creation mechanisms in some way in order to get the best of both worlds and the Template widget does just that.

The template widget is a widget that binds dynamically to a piece of content, just like a folder template, but as a widget. It can be placed in a Page Builder page along with any number of other widgets. The result is not a page as such but a template. It can be assigned to a content folder as a template and will function in exactly the same way.

The upshot of all this is that a CMS user can create and deploy templates to the various folders of the website without the need to engage the services of a developer. Take say the news items we mentioned earlier. In this case the CMS user might create 4 different news templates, each one created using Page Builder, and each one having a different set of widgets, perhaps ads in some, maybe a video widget in another. In the main content well of the page the user places a Template widget. He then configures all of these various “templates” to be associated with the news folder. Henceforth anyone creating a news item has a choice among these 4 different news templates. If the site admin decides he needs another 5th variant of the news template all he needs to do is create one using Page Builder.