Patricio Treviño

Patricio Treviño

Husband . Father . Developer
8total entries in sitecore

Supercharging the Success Message in WFFM forms

How many of you have opted for a redirection to a thank you page over a simple successful message with no refresh when dealing with Web Forms for Marketers? If you are doing this willingly, then fine, but if you are doing it because there are no styling options in the Success Message field, then keep reading... there are a few tricks you can use to supercharge this field.

Field value interpolation in Sitecore

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.

Don't repeat yourself with Sitecore Branch Templates

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...

Adding query string arguments to links in the Rich Text Editor

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)…

Get the list of all locked items for a specific user in Sitecore.

Syntax

fast://*[@__lock='%<username>%']
view raw syntax.text hosted with ❤ by GitHub

Option Description
username The username to be searched.

Note: The query is executed as a wildcard search, so the username doesn't have to be exact.

Get the list of all locked items in Sitecore.

Syntax

fast://*[@__lock!='' and @__lock!='<r />']
view raw syntax.text hosted with ❤ by GitHub

Customize a rendering instance using parameter templates and the mvc.renderRendering pipeline

I've always been amazed by how configurable and extensible Sitecore is. Every time I think I'm taming the beast, Sitecore just looks at me, smiles and reminds me I know nothing... In other words, Sitecore keeps me humble...

This week I learned it is possible to have a more granular control over a rendering inside the presentation layer using a combination of parameter templates and the mvc.renderRendering pipeline. In my case I was looking for a way to invalidate the rendering's cache, but I only wanted to do it for specific pages while keeping the others intact. Thankfully, this combination was just what I needed.

Customize the Role Manager tool in Sitecore

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.