sitecore-launchpad-add-application

Add a SPEAK application to the Sitecore 8 Launchpad

My brain is currently in a complete amoeba state. This is my first blog post since I started my paternity leave some 4 weeks ago. I had been planning to write a post a day but I guess this is not really how taking care of a baby works. The Launch Pad was introduced in Sitecore 7.1 even though it back then did not contain any applications. In Sitecore 7.5 the xFile application was added to the launch pad as the only application that shipped with Sitecore. ...

December 4, 2014 · 3 min · alc

Sitecore 7.5 Analytics templates bug

Found an interesting bug today in a Sitecore 7.5 installation and I think it is worth sharing. I have to mention that Sitecore Support has been notified and they are working on an official fix. I have noticed this issue after I upgraded from version 7.2 but also on clean installations. If you navigate to this path in Sitecore: /sitecore/system/Marketing Center/Engagement Plans you will see that all the display names of the engagement plans, states, conditions and actions are "__Standard Values". ...

November 11, 2014 · 1 min · ap
queryableextensions

Generic extension methods for Sitecore ContentSearch

I would first like to mention that the code shown in this post is not originally mine. I’ve been using it quite often lately and made some tweaks to it which is why I think it deserves a quick blog post. Some of the code originate from my colleague Uli Weltersbach, he wrote a blog post on how to index base templates in Sitecore. The rest of the code I got from my colleague Bo Breiting. He wrote this blog post about his extension methods for Sitecore ContentSearch. ...

November 6, 2014 · 4 min · alc

Sitecore 7.5 Analytics and user manipulation in Engagement plans

I have recently had the interesting and challenging task of upgrading a Sitecore 7.2 installation to the newest Sitecore 7.5. In the project we were extensively using Analytics code which had to be updated. That is where the fun began. In our solution we had to manipulate users in engagement plans. Users had to be added, removed or moved between engagement plan states from the code. In order to do that we had to change the code to adapt it to the new API. Here are the changes. ...

November 5, 2014 · 2 min · ap
missing_method_on_sitecore_updatehelper_distorted

UpdateHelper SaveInstallationMessages() removed in Sitecore 7.5

Sometimes we use the Sitecore class called UpdateHelper to install packages on different Sitecore instances for example via a webservice. Today I copied some code from a Sitecore 7.2 installation which did exactly this. It is a simple service class that installs a package from a path and then it logs the installation results as done by the Sitecore InstallUpdatePackage wizard. public static string InstallUpdatePackage(String packageFile) { var log = LogManager.GetLogger("LogFileAppender"); string result; using (new ShutdownGuard()) { var packageInstallationInfo = new PackageInstallationInfo { Action = UpgradeAction.Upgrade, Mode = InstallMode.Install, Path = packageFile }; string text = null; List<ContingencyEntry> entries = null; try { entries = UpdateHelper.Install(packageInstallationInfo, log, out text); } catch (PostStepInstallerException ex) { entries = ex.Entries; text = ex.HistoryPath; throw; } finally { try { UpdateHelper.SaveInstallationMessages(entries, text); } catch (Exception ex) { log.Warn("Unable to write the installation messages", ex); } } result = text; } return result; } But the code would not compile when using the Sitecore.Update.dll from 7.5 ...

October 28, 2014 · 2 min · alc
custom_caches_in_Sitecore

How to create a custom cache in Sitecore

When coding a Sitecore solution you sometimes need a cache to store some values. I’ve seen a lot of different cache implementations in Sitecore solutions that do not use the Sitecore API. Such an implementation could for example use a static or perhaps a singleton some even go further and use a custom database or a nosql document database such as RavenDB or Mongo. It is very rare that these implementations could not simply be replaced by using the built-in Sitecore caching API. ...

October 26, 2014 · 4 min · alc
mailserver

Sending emails in Sitecore

Sometimes you need to send an email from your Sitecore code. I’ve seen a ton of solution implementations where the developer have written some custom class that sends out emails using a SMTP client, good old classic ASP.NET. I myself even wrote code for that in Sitecore solutions some years ago. That was before I noticed the very simple method on the Sitecore.MainUtil class called SendMail. The SendMail does exactly what you expect it to do. ...

October 26, 2014 · 2 min · alc
richtext_field

Customizing Sitecore rich text field configuration

People often ask me questions on how to configure the Sitecore rich text editor in various ways. The Sitecore rich text editor is really easy to control and customize and there are already a lot of blog posts about it out there. Most of these posts only show how to create custom editor profiles and not how to override the actual editor configuration. I guess everyone knows how to create custom rich text editor profiles by now so this is not what I want to show. If this is what your are looking for then just ask google. ...

October 23, 2014 · 5 min · alc
speak_goodies

Sitecore SPEAK v1.2 goodies

This post show some of the new goodies we Sitecore developers get when working with Sitecore SPEAK 1.2 and Sitecore Rocks compared with the previous version of SPEAK. Strongly typed View Model In SPEAK 1.1 there was a lot of plumbing work you had to do almost all over the place. In your cshtml view you first had to get the user control from the Sitecore Mvc RenderingModel. Then you could start building up your view by getting the rendering parameters from the model by calling various Get methods with loosely typed parameters. ...

October 19, 2014 · 7 min · alc
initpipeline

Global.asax events and Sitecore pipelines

At Pentia we always try not to change any files that ships in an out-of-the-box Sitecore installation. This makes upgrading easier and the solution code more transparent for developers. Sitecore ships with a standard Global.asax file and a lot of Sitecore developers choose to make changes directly in this to hook into application and session level events. For example see the tutorial code from Glass Sitecore Mapper here the Global.asax is used to set the glass context on the Application_Start event. ...

October 12, 2014 · 2 min · alc