The Technicalities of Dynamic Content

Posted: Nov 29, 2019
Content Management Sitefinity

Dynamic content has changed the content management world. The phrase Dynamic Content simply means the ability to change function and structure. The ability to show different text and views (how that text is displayed) is dynamic content. This is not to be confused with personalization. Content that changes based on a user’s location or other characteristics known about that user is considered personalization. While personalization is form of dynamic content, what this article looks to describe is a widget within a content management system that a website’s administrator can modify to display content.

Benefits of Using a CMS

A content management system (CMS) is a software application that can be used to manage the creation and modification of digital content. The major benefit to using a CMS to manage the content on your website is that you do not need to know HTML, CSS, or other languages to change the content on your website. CMSs are graphical interfaces that is accessed through a browser and is only accessible to those with a login. “Sitefinity” is one such CMS which allows Vanguard clients to update content on their own.

Content Types

Sitefinity comes with predefined content types. You can create a Blog type, News article, Event, Forum and more. Some widgets, like Forums and Blogs, have a hierarchical structure. This means you, as the content creator, must create a Blog before creating articles within that blog. A Forum must be created before you create a forum thread and so on. Each content type has its predefined fields. Each of the predefined types come with a field for title and a place to store content i.e., information in the form of text with or without HTML. Events contains date fields and a calendar. News articles contain fields for author, source and URL.

Sometimes, you may need a field in one of these content types that doesn’t currently exist. For example, the “News” content type does not have a field for a featured image by default. Luckily, Sitefinity will allow you to create custom fields to add to any content type. If all that was required was an image to the news article, then I would add a custom field. However, if I needed an image and a calendar and some other field then you should consider creating a dynamic content Item. The truth is, when more than one custom field is required, the original type is not really that type any longer. With Sitefinity Content Management System you can create your very own custom “Content Type”.

Controls and Modules

Within Sitefinity, you can easily organize and customize content using controls, modules and widgets. If you want to create a self-contained new content type, we create a control.

A "Control" is the embodiment of how content for that content type is entered, displayed, and functions (essentially, how the content type works). A control is made up of a “module” and a “widget”.

A module is a part of the control and is made up of different fields to customize what will be in that content type. The website administrator fills out a form to create an item of content for that content type, or control. The content that is entered lives within the control.

A widget is a configurable container that houses a type of content. Widgets are user-friendly and are the tools you will find yourself using often. It is up to the configuration of a widget to decide what content items to display to your users. For example, if you wanted a page to only display blogs articles from the “Board of Directors Blog,” but not all blogs, you would add a blog widget to the page. This widget only pulls content from the blog control (which you entered earlier through the blog module). You can change the settings of the widget on that page to only display items by certain criteria (In this example, being “Board of Directors”). You may have one widget template that only list the blog posts’ title, author, and short description and another widget template, while pulling the same articles, may display the same title, featured image, and posting date. As you can see, you have the freedom to display anything you choose to.

Using Widgets

Content is added to a page by dragging widgets in the places you want the content to appear. The content in these widgets are reusable, can be displayed on more than one page, and others can view, edit and publish it easily. This is done using widget templates. Widget templates enable you to style these widgets, so you can easily drag and drop them on any page across your site, and it will appear using that same style.

Where do you begin?

First, you must define all fields the module will contain. You must define if the items will have a hierarchical structure or not. Once you have all the details on what the content will contain and how it is going to be structured, we can begin creating the custom content type.

This is a game changer. No matter what need, you have a model can be created that will represent it. Sitefinity creates controls which allows you to just drop the control on a page.

Creating More Complex Content Types

A more detailed example is a staff directory. To create the module, we want these fields. Name, Address, Biography and Image. Once created we have two widget templates created for us. A listing view and a details view. We drop the listing view on a page. We set the listing view to only display the Name and image. Both fields are hyperlink which will auto generate the details view. When on the details view the user will see all four fields. Keep in mind that you do have to create each staff members. You can now have anyone create the content and you never have to change the page data.

Get Creative!

The opportunities are endless when it comes to creating custom and dynamic content types within a CMS like Sitefinity. Although Sitefinity is programmed with many existing content types, you must remember that everything can be customized, and you are not limited to certain fields within each content type. With this creative freedom, your desired functionality of your website content is literally at your fingertips!

 
More Articles
and Topics

Author:

Ken Anderson