Using Umbraco as an application platform: Part 2 - Templates

This post is part of a series, this being the second part, if you're interested, read the first part here.

As in every Umbraco project, the first thing to do is set up the Document Types, as they are the containers for data.

Since Umbraco supports inheritance through Master Document Types, I set mine up so that they reflect the different kinds of content available for users (beside the types needed for the UI). My base type is called ContentRegion, it has properties for size and position. Inheriting from ContentRegion is ColoredRegion, with properties for colors, it then in turn has different regions inheriting from it, like FormattedTextRegion and SimpleTextRegion, where the formatted region is a HTML editor, and the simple one is just a text string.

There's also an ImageRegion, with the derived types Image and Upload, where Image is the templated version used by editors, and Upload enables end-users to upload their own content for inclusion in the final PDF. Finally, I created a SelectiveRegion type, that has no content of its own, but will enable end-users to select a child to use and edit.

PDF Studio DocumentTypes

Editors create "templates" of materials, by specifying the size and position of different regions on a page, the hierarchy determines the order, or z-index, that the regions are rendered, enabling overlapping and covering, if desired.

PDF Studio Structured Content

This makes it fairly easy to create and edit templates, enabling editors to create multiple types of content that end-users can edit and output as pdf's.

Next up: Getting the data to the end-user

blog comments powered by Disqus