Belangrijke mededeling over deze pagina:

Deze pagina is niet beschikbaar in het Nederlands en daarom wordt de Engelse versie van het artikel getoond. Dit komt vooral voor bij technische artikelen.

I recently came across a Sitecore instance that displayed information about the version of the custom binaries in the Sitecore login screen.
It seems like a useful thing to do, but I don't think a lot of people know how to do it (including me until I saw this instance).
Turns out it's very easy!

There is a pipeline called getAboutInformation that is used to retrieve the data that is displayed in the login screen underneath the Sitecore version number.
Here is some example code of a processor for this pipeline:

using Sitecore.Pipelines.GetAboutInformation;

public class GetVersion
{
  public void Process(GetAboutInformationArgs args)
  {
    string version = "1.0.0.1407111106"; // Dynamically get the version somehow

    args.LoginPageText = string.Concat("Platform ", version);
  }
}

Add this processor to the getAboutInformation pipeline with a little piece of include configuration:

<pipelines>
  <getAboutInformation>
    <processor type="YourAssembly.GetVersion, YourAssembly" />
  </getAboutInformation>
</pipelines>

Now browse to the Sitecore login screen to see the result!
This is especially handy when builds and deployments are automated and you need to keep track of which version is running.

2 Reacties

  • Door Mike Reynolds op 8/26/2014 om 4:46 PM

    Hi Ruud,

    I wrote a post where I also leveraged the getAboutInformation pipeline using some custom processors: http://sitecorejunkie.com/2013/05/18/display-content-management-server-information-in-the-sitecore-cms/

    Great post!

    Mike

  • Door Kevin Brechbühl op 8/26/2014 om 10:07 AM

    I recently wrote a similar post about showing the version on the login page: http://ctor.io/adding-additional-information-to-the-sitecore-login-page/ Also Robbert Hock has written a small module available in the Marketplace: https://marketplace.sitecore.net/en/Modules/Sitecore_Partner_AboutInformation_Module.aspx

    Maybe worth a look :)

    Greets,
    Kevin

Plaats een reactie