Content preparation in Umbraco
In order to build the site’s content structure and filter it in Enterspeed, we have to do some groundwork as - creating document types, data types and adding some articles as content.
Document types
Article
Used for article content nodes themselves, with the following properties:| Property | Data type | Description |
|---|---|---|
| title | Textstring | Title for the article |
| subheader | Textstring | Subheader for the article |
| publishedAt | DatePicker | Published display date for the article |
| tags | Tags Picker | Related tags for the article |
Period Group
Is a document type without any properties, in the content tree, it will be used a grouping folder for articles per month, e.g. 09/2021.Articles
Is a document type for grouping all ‘Period group’ content nodes.Settings
Document type contains various settings for the site and different data types.Tags
Used as container node for listing all possible tags underneath it in the content tree.Tag
Tag, that can be news article can be associated with.Articles By Tag
Is an Element Type document type, describing a block for displaying articles by a specific tag. Will be used on the front page of the site.| Property | Data type | Description |
|---|---|---|
| title | Textstring | Title used for the block, f.x. - ‘Latest from football world’. |
| tag | Single Tag Picker | A tag that you want to include articles for. |
| top | Numeric | Define how many articles you want to see. |
Site
Document type representing site instance.| Property | Data type | Description |
|---|---|---|
| blocks | Frontpage Block List | Our front page will consist of different blocks as - articles by tag, and potentially many others. |
Data types
Single Tag Picker
Is a data type extending Umbraco default ‘Content Picker’, where we specify ‘Tags’ content node as a start node.Frontpage Block List
Is a data type extending Umbraco default ‘Block List’, where we add a single available block - ‘Articles By Tag’, that we have created previously as part of Document types.Adding blocks to frontpage
On the site node, we are going to add some blocks for displaying articles by different tags.


Defining schemas in Enterspeed
Creating a Site schema
Site schema will work with source entities of type - ‘site’ since those are the ones where we have defined our blocks (in Umbraco) to describe what blocks we want to display. This schema doesn’t contain much of the logic, its responsibility is to iterate over blocks defined on the source entity and pass each of the blocks in partial view, with matching name.'item.contentType' value is an alias of our current block Element document type in Umbraco - 'articlesByTag'.
Creating a partial schema - Articles By Tag Block
We are halfway through. The previous schema iterated through blocks, this schema will handle a specific type of block -Block-articlesByTag.
As result, we want to display the following properties - alias and title of this block and collection of articles matching criteria defined on this block along with basic information about them - title, subheader, publishedAt date and a list of tags associated.
$lookup in combination with filter, top, and orderBy. In simple words, we want to lookup all source entities that match our filter, meaning where the type of source entity is an article and it has a current block selected tag associated with it.
On our front page, we want to show the latest published news first. That is what we define in our sorting criteria for all filters found in source entities. Lastly, regarding lookup, we defined a limit on how many articles will be displayed for the current block.