CREATING A STRUCTURE

The basis of all created content is rooted in the document types that you create. Without any defined document types, no way would exist to create the content. Chapter 3 covers the details of creating a document type and how they are constructed. This chapter discusses what it means to structure the document types to create the content tree that you designed in your planning phase, as suggested earlier in this chapter.

Think about how you want the users of the Umbraco backoffice to work with the content tree. Some questions you might ask are:

  • Will I need to have different roles accessing only parts of the content structure?
  • Will restricting the types of content that can be created in certain parts of the content tree be necessary?
  • Should editors have access to the Media library? If so, only parts of it? Should they simply have the ability to upload a file/document on a per-page basis?

The answers to these questions (and more) will determine how you build out your document types. For the purposes of this example, assume that the requirements dictate that you create two different editors — one for standard page content (who will have access to all the content) and one for editing news articles only. This means that the news editor should not be able to add standard content pages to the site. To control this access, you set the allowed child types as appropriate when creating the document type for news articles (covered in Chapter 3).

For the news articles, you want to create two distinct document types that you can add to the content tree (see Figure 8-1 for an illustration of the content tree):

  • News Area: This acts as a container for all the news articles.
  • News Article: This is the actual news article that will be added to the site. This is the document type that holds all the news properties (such as article date, summary, and so on).

FIGURE 8-1

image

Because you planned your content, you know that News Article will be a child node of the News Area, so creating the News Article first makes sense. Also, in this case, News Article will not have any child nodes allowed, so it's the perfect place to start:

  1. Create the News Article document type. Note that you can create the News Area document type and the associated template in one swift move. If you need a refresher on how to work with Document Types, see Chapter 3.
  2. Set the News Article as an allowed child type of the News Area, as shown in Figure 8-2.
  3. Allow the News Area to be a child type of the Runway Homepage document type.

image Creating the News Article as a child document type of the News Area is not necessary because the two of them will not share any common properties. Setting the News Article as an allowed child type is not synonymous with its being a child of the News Area document type. The allowed child node type designation refers to the relationship between the two document types in the context of the content tree only.

Remember, too, that creating parent document types to share common properties, such as meta tags, is a good idea to avoid document property duplication. For more information on how to work with parent document types, see Chapter 3.

You can apply the same approach to many other types of content, of course, such as events, profiles, staff records, and so on. The next section discusses how templates fit into the content creation scheme.

The other noteworthy feature of Umbraco is its flexible node-sorting capabilities. You can easily sort nodes at all levels of the content tree by right-clicking a container node and clicking the Sort menu item. You have two ways to sort your nodes from the resulting Sort dialog:

FIGURE 8-2

image

  • Simply drag the nodes.
  • Click the headers in the columns to sort by either name or creation date, as shown in Figure 8-3.

FIGURE 8-3

image

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset