Custom tooltip in Episerver page tree

Sometimes it can be useful to have your own tooltip in the Episerver page tree. This is particularly true if using a multi-language page and even more so if the editors don't speak the language.

To be able to change the Episerver page tree tooltip we need to fiddle with some Episerver internals.

We need to replace the default implementation of PageRepositoryDescriptor and write our own Dojo page tree component to be able to change to the tooltip.

To replace the PageRepositoryDescriptor we are going to use an Episerver InitializableModule.

What the initializer does is that it wraps all IOC requests for IContentRepositoryDescriptor. If the type if of PageRepositoryDescriptor we replace is with ower own implementation of PageRepositoryDescriptor, the CustomPageRepositoryDescriptor. How you do this exactly can vary depending on your Episerver version.

The CustomPageRepositoryDescriptor inherits from PageRepositoryDescriptor and only changes one property, what Dojo component to use.

As all custom Dojo components we need to register them in the modules.config

The script

I'm no Dojo expert and there might be better ways of doing this.

This is how it can look when using a custom tooltip on a page written in Korean. But using the custom tooltip I can see that this is the "This is the about page". This text was, of course, set when the page was first created. example