sitecore_login

Changing the image on the login screen in Sitecore 8

I really like the new login screen in Sitecore 8. The old one was also getting very old, except for some small makeovers especially from Sitecore 5.3 to 6 and the addition of a few new applications it has been almost completely static for more than 8 years. Once upon a time the login screen had the option of adding a partner logo and some additional text. I am not sure if anyone ever used this feature or if it was still working in the later versions of Sitecore 6 and 7. ...

January 19, 2015 · 2 min · alc
html_for_babies

Extension methods for versioned layouts in Sitecore 8

Finally I am back blogging. The last 1½ month of my paternity leave and the first week of work did not go exactly as I had planned. Looking on the bright side I have learned a lot about how a baby’s immune system evolves. It goes something like this, baby gets a virus/bacteria, it incubates and when it is strong enough it attacks the parents (the virus, not the baby). One virus or bacteria rarely visit a baby alone since their immune system is weakened making them easy prey. This means a common cold suddenly can become severe diarrhea (feasis everywhere) and then pneumonia that needs treatment with penicillin which then can feed some mushroom loving rectal e. coli bacteria that causes diarrhea and so on.. ...

January 11, 2015 · 6 min · alc
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
wildcardparser

Matching Wildcards in Sitecore

While reading this nice blog post by my colleague Uli about resolving a Sitecore SiteContext from an URI I noticed that he used a regex to match a hostname using * as a wildcard That made me remember the Sitecore class called Sitecore.Text.WildcardParser. I once wrote a blog post about this class but I never got around to publish it. So now I’ll try again and keep it short. The WildcardParser class is pretty unknown even though it is an oldie in the Sitecore API. It can be used to match a string value with an array of strings where a * means wildcard. It is used by Sitecore to check if a SiteInfo class matches a hostname. An example usage of the class could look like this: ...

October 26, 2014 · 1 min · alc