In a previous blog post we talked about branch templates and how they make a content author's life a little bit easier by reducing the creation process of complex tree structures to a mere click. But, unbeknownst to most, the post also introduced us to a new concept: tokens.
Wikipedia defines Don't Repeat Yourself (DRY) as a principle aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy. Easy right? In fact, so easy that most developers apply the principle almost naturally and, in most cases, without even noticing they are using it.
Have you ever considered how Sitecore uses it? Oh yes, Sitecore does use it and extensively.
Don't believe me, keep reading...
Sitecore has a pretty neat functionality for managing and rendering links. Most of the features are available to content authors via a few specialized components (Rich Text Editor, Droplink, Droptree, General Link and General Link with Search amongst others) and to developers via the LinkManager API. For obvious reasons, components focused in link management are easier to configure than those that serve a more general purpose. A clear example of this is the query string configuration in controls like the General Link vs the RTE (Rich Text Editor)…
In Sitecore, roles are the preferred way of managing access to resources. The beauty of roles lies in their ability to shield the administrators from the complexities of security and user management, so instead of spending hours setting up individual accounts with specific rights and remembering these combinations, administrators can simply create a role, define the level of access and start adding users, groups, or even other roles to it. Simple and effective.
The preferred tool for the job is the
Role Manager screen (see below).
Unfortunately, this tool is far from perfect... so let's do something about it.