UMBRACO BUILDING BLOCKS

Umbraco consists of several different sections that, together, make up the comprehensive tool that Umbraco is. The following section discusses what each one of these does and how to appropriately assign them to users.

Understanding the semantic and functional split between these sections is important to you as a developer and implementer of the CMS. You can think of it like the process of building a house where each phase of the project has dedicated roles and responsibilities. Much like it is up to the mason to build a strong and lasting foundation, your job is to do the same with templates, layouts, document types, and styles for the editor to leverage for saving and publishing content.

RESTRICTING ACCESS IS BOTH IMPORTANT AND NECESSARY

I have found in numerous projects that keeping non-technical editors and writers away from the more advanced sections within the Umbraco backoffice is important. Providing access to templates and document types to someone who “knows enough to be dangerous” inevitably leads to a disaster because it allows them to make real-time changes to the website's infrastructure and integrity. How to restrict access should be part of your training phase when deploying your implementation at the client site.

To paint a picture, imagine in the earlier house building analogy that you, as the homeowner, were allowed to mix the concrete for the foundation. Unless you're an expert at concrete, chances are your foundation might crumble with time!

Content

You guessed it! The Content section is where all the content is managed within Umbraco and where most of your admin users will spend their time. In the Content section, content types that you have set up as a developer become available for the editor and/or writer to use for content creation.

You must give special attention to the content Properties tab, which you will always see as part of the right pane for all document types. Figure 2-5 shows that you can control a number of settings for the node in the Properties tab:

  • Name: This setting controls not only the name of your node but also the URL of the page on the front end of your site. So, if you change it, you also change the URL for the page.
  • Created by: This is the user who created the node in the first place.
  • Created: This indicates when the node was created.
  • Id: This is the internal ID of the node. In Umbraco, various methods use this ID; for example, NiceUrl(id), which generates a search engine optimization (SEO)-friendly URL.
  • Document Type: This indicates with which document type this node is associated.

    image After a node has been created, you cannot change the document type because different document types will have, in most cases, vastly different properties. This means that if you filled in a value for the First Name field in one document type, it may not exist in the next, rendering the ability to change document types after node creation useless. Instead, if you need the ability to have different output for similar content, consider creating a document type that supports common properties and instead allow multiple templates for that document type. Chapter 4 discusses this approach in detail.

    FIGURE 2-5

    image

  • Template: This shows the template associated with the page. This field can have multiple values because a page could take on multiple shapes based on the specified template (covered in Chapter 4).
  • Publication Status: If the node is published, then the date when the node was last published is displayed, along with a button to Unpublish the node.

    image If you unpublish the node that you're currently on, the entire site becomes unpublished and rendered inaccessible to the end user. Be careful where you use this function.

  • Last edited: The date when the node was last saved.
  • Publish at: You can specify when a particular node should be published. This allows you to be on vacation and still have that critical press release go live right on time!
  • Remove at: Similar to Publish at, this setting automatically unpublishes the node at the specified date and time.
  • Link to document: This provides you with the various links through which this page is accessible.

image The link to document field would have multiple entries if you had specified more than one entry in the hostnames setting for the Umbraco website. This setting can be managed by right-clicking the homepage node of your website and is discussed in detail in Chapter 7.

Most of the options in the context menu (shown in Figure 2-6) on the Content nodes are self-explanatory. However, some deserve your attention for further explanation:

  • Edit in Canvas: This option allows you to edit the content node within the template. A menu bar is provided at the top of the screen and you can edit the content inline. This feature is useful if users want to be able to see how the changes directly affect the page while editing. Figure 2-7 shows an example of this interface.
  • Manage hostnames: This option allows you to set the node's root domain. It is typically used in a multisite environment or subdomain situation for multilingual sites.
  • Permissions: The next section discusses permissions in detail, but here you can limit the actions for particular users on individual nodes. Items left unselected will not be available to the user in this context menu. See Figure 2-8 for an example.

    FIGURE 2-6

    image

    image Furthermore, you can configure a user to automatically start editing in canvas mode if that is his or her preference.

  • Public access: This function allows you to set up which member groups are allowed to access the node from the front end. You manage members and member groups in the Members section. The beauty of this is that Umbraco leverages the standard .NET Membership Provider for this. See the “Members” section in this chapter for more details.
  • Notifications: You can set up notifications based on several different events, as shown in Figure 2-9. The notifications are sent automatically to the email address configured as part of your user details.

FIGURE 2-7

image

FIGURE 2-8

image

Users

Before reading the general discussion of what the Users section provides you, you should know the difference between users and members—a common question, to say the least. It's quite simple actually; a user is an account that has access to the Umbraco backoffice and all that this entails, whereas a member is an account that has access to restricted content on the front end, like a client login or extranet (see the “Members” section later in the chapter).

Having said that, read on to find out what the Users section does.

Functions and Properties

The Users section manages the administrators, editors, writers, translators, and whatever other custom user types you may have defined. This section is where you add and edit users that have access to the Umbraco backoffice. As shown in Figure 2-10 and Table 2-1, a number of properties exist for each user in the system.

FIGURE 2-9

image

FIGURE 2-10

image

TABLE 2-1: User Account Properties

image

image

image After a user account has been created you cannot delete it. You must use the Disable User option to prevent future logins.

User Types

As discussed earlier, user types allow you to assign user accounts with predefined sets of permissions on the content tree. If one of the predefined user types does not fit your needs, you can create your own custom types. As shown in Figure 2-11, you will notice that the label for this user is kind of whacky—it has braces around the name. The braces mean this value is pulled from the localization files so that if the language is set to something other than English, the name is translated.

FIGURE 2-11

image

Setting Up a New Dictionary Label

In this exercise, you will set up a label for a new user type so that it can be read correctly in various languages.

  1. In the left pane, under the Users node, right-click User Type and click the Create menu item.
  2. In the User type Name field, type in the name of the new user type (without spaces).
  3. Select the various default permissions, as shown in Figure 2-12, for the new user type. Click the Save icon.

FIGURE 2-12

image

If you navigate to the details of Content Editor, you will see that the value in the drop-down list is surrounded by braces “[ ].” To change that value, follow these steps:

  1. Navigate to your language settings folder: <install root>/umbraco/config/lang.
  2. Open the associated language file to which you want to add the key and value (in this example, en.xml).
  3. Find the section that begins with <area alias=“user”> and add the following to this section: <key alias=“yourAliasHere”>Your User Type Name Here</key>.
  4. Repeat steps 1–3 for the other languages that you need (and know the translation for). That's it!

Permissions

In addition to the flexibility of the aforementioned user settings, Umbraco also comes equipped to handle more granular permissions on a per-user basis. This capability might come in handy when you have individual users who have special permissions but do not warrant a custom user type.

image User permissions and access only apply to the content tree and nothing else.

Setting Up a User for Access to Multiple Start Nodes

As shown in Figure 2-13, you can set permissions at another dimension as well, namely by one or more content nodes. This feature is particularly useful if you have a user who must have access to multiple sections of your content tree.

FIGURE 2-13

image

The following steps show you how to set up a user to have multiple start nodes in the content tree, effectively bypassing the settings of the user's account.

  1. Set your user's start node (see the Content Access item in Table 2-1) under Content Access to the home node, Runway Homepage.
  2. Expand the User permissions node in the left pane and select the name of your user from the resulting nodes.
  3. Select the Runway Homepage check box, as shown in Figure 2-14.
  4. Deselect all the boxes in the right pane.
  5. Make sure to select the Replace child node permissions check box and then click Save, as shown in Figure 2-15.

    FIGURE 2-14

    image

    FIGURE 2-15

    image

  6. Deselect the Runway Homepage node and expand the rest of the tree.
  7. Select at least two nodes in the children of Runway Homepage and apply the necessary permissions (be sure to include the Browse permission or the user won't see any of the nodes).
  8. Again, select the Replace child node permissions check box to cascade the settings to any child nodes.

image You can also set permissions on a page-by-page basis in the Content section. Reference Chapter 8 for more details on how this approach works.

Media

The Media section is fairly short and sweet because it simply deals with asset management such as images, files, and folder structure. Umbraco is not a document management system, and it doesn't claim to be. It provides just enough functionality to provide a content editor with a way to easily manage website assets and organize them.

image If you are looking for advanced features, such as image cropping, resizing, text overlay, batch uploads, and more, be sure to check out the Umbraco community projects page on http://our.umbraco.org. See Chapter 10 for more details about packages.

Three different types of media are supported out of the box in Umbraco, as shown in Table 2-2 and Figure 2-16.

TABLE 2-2: Media Types and Properties

image

image Folders are useful for providing access to specific areas of your Media section. The process of setting up a user's start node in the Media section is discussed in the Content Access item in Table 2-1.

FIGURE 2-16

image

Settings

As the name suggests, the Settings section provides access to all the Umbraco-specific settings. Most of the nodes in this section have their own chapters in this book (as noted in the following list):

  • Stylesheets: This is where you add new stylesheets and manage individual styles for inclusion in the rich-text editor (RTE). Chapter 4 provides the details of how to work with styles and the rich-text editor.
  • Templates: Create and manage the website's .NET MasterPages (see Chapter 4 for details).
  • Scripts: This node allows you to manage JavaScript and XML files for use in the CMS. See Chapter 4 for additional details.
  • Dictionary: Manage labels and other values used to set dynamic content based on the user's locale and language settings (see Chapter 6).
  • Languages: Manage the languages that should be set up for the end users of the website and also for the backoffice users.
  • Media Types: Allows you to add additional media types for use in the Media section.

    image You can add media type properties in the Settings section, but for now the Umbraco backoffice will not display those properties in the media details. As of this writing, that feature is still unimplemented.

  • Document Types: This is where you will manage and set up the entire structure of your website. Each node that is created in the Content section will be based on one or more of the document types that you define in this section. Chapter 5 covers document types in great detail.

Developer

The Developer section provides controls that enable you to extend Umbraco with custom functionality and extend it using the rich API. Many of the nodes in this section are covered in other chapters, but here's an overview of what they are:

  • Cache Browser: This allows you to see what is in the Umbraco application memory cache. It is useful for troubleshooting or reviewing site performance.
  • Data Types: The items under this node make up the fields that are on the content editor's user interface for any given document type. So, when you put a rich-text editor on a document type (covered in Chapter 3), you are essentially pulling it from here. You can configure the settings for the various data types for each one in this node.

    image Check out Chapter 12 for some examples on how to create your very own data types!

  • Macros: Chapter 5 discusses what macros are and what they do in detail, but for now suffice it to say that they provide the gateway for a developer to embed custom functionality in the CMS-generated content.
  • Packages: Packages provide a way for developers and webmasters to install custom functionality that others have developed. Chapter 10 covers a couple of classifications of packages in more detail and also shows you how to install them and even create your own.
  • Scripting Files: If you are a fan of Ruby, LOLCode, or Python, you can use it to extend Umbraco just like you would with a .NET user control. Chapter 5 covers this topic further and also provides some examples.
  • XSLT Files: As you probably know by now, Umbraco is operated largely on its XML cache. As a developer, you can gain access to this cache via XSLT stylesheets and transform the data to fit your needs. Chapters 5 and 11 cover XSLT macros.

Members

The Members section is where you manage accounts with access to the public website. As an administrator you can use this interface to add member accounts, groups, and types. With this interface, you can now set access restrictions on nodes within your content tree.

image Some configuration changes are required in the Web.config to make member types functional. Because access restrictions are so specific to your particular implementation, creating a member type and defining it as the default in Web.config is necessary. This process is discussed as part of the examples in Chapter 12.

The Members section is broken down into three separate main nodes. As mentioned earlier, the member groups and member types will be specific to your implementation and are therefore left blank by default.

  • Members: This is where all of the members are grouped into alphabetical folders to make finding individual members easy. As shown in Figure 2-17, when an individual letter is clicked a list of all the members appear in the right-hand pane.

    FIGURE 2-17

    image

  • Member Groups: This is used to provide role-based access to content nodes where public access is restricted. Each member must belong to one or more member groups.
  • Member Types: This is used to define member profiles and associated properties. Chapter 12 provides examples and the details of how member types affect the login process.

Creating a Member Group

Creating a member group is the first thing you want to do. Members must belong to a member group to be able to log in. Follow these steps:

  1. Log in to your Umbraco website.
  2. Navigate to the Members section.
  3. Right-click Member Groups and click the Create menu item.
  4. Enter a name in the Create dialog that appears. Click the Create button, as shown in Figure 2-18.

FIGURE 2-18

image

Creating a Member Type

Member types define the properties of a member account. As such, it is the second item that you should define in a blank Umbraco installation.

  1. In the left pane under the Members node, right-click Member Types and click the Create menu item.
  2. Enter a name for the member type in the Create dialog that appears and click the Create button.
  3. In the Generic Properties tab, listed at the top of the right pane, set the required properties for this member type, such as address, shoe size, or whatever else is needed for your particular implementation, as shown in Figure 2-19.

    image Email address, name, and password are all captured as part of the standard member properties. In addition to these standard fields, you can add fields specific to your needs.

  4. Save the new member type by clicking the Save icon, as shown in Figure 2-20.

Translation

The Translation section provides users with a way to access the translation workflow that comes standard with your Umbraco installation. If you choose to use this workflow, make sure that you designate users in the Users section with the Translation user type so that content editors and writers can assign content to those users for translation.

Have a look at Appendix D for a full overview of how to implement the translation workflow.

FIGURE 2-19

image

FIGURE 2-20

image

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

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