Have a look at the ShellMenuProvider:
Maybe you can create your own implementation of UserGuideUrlProvider?
Thank you Tomas for this tip but it seems that in version 11.32 this link is defined in ShellMenuProvider class
If I would to implement IMenuProvider interface in my custom class that has been decorated with the MenuProvider attribute and returned only one MenuItem from the GetMenuItems method (the desired one) I would still end up with link to 'User guide' added twice.
Once, the first time, with my desired link, and the second time with the default Optimizely help url.
How should one define that my CustomUserGuideUrlProvider is to be used instead of the default one?
I just tested with the latest version Episerver.CMS.UI 11.36.3, this worked for me. You can tell Episerver to use your version using the ServiceConfiguration attribute like this:
[ServiceConfiguration(ServiceType = typeof(UserGuideUrlProvider), Lifecycle = ServiceInstanceScope.Singleton)]
public class CustomUserGuideUrlProvider : UserGuideUrlProvider
{
public CustomUserGuideUrlProvider(ICurrentUiCulture currentUiCulture, ServiceAccessor<RequestContext> requestContext) : base(currentUiCulture, requestContext)
{
}
public override string Url => "https://www.gulla.net";
}
And the quick warning: https://marisks.net/2018/01/31/serviceconfiguration-attribute-considered-harmful/
If you want to override the displayname in the menu too, have a look at this blog post: https://blog.novacare.no/change-text-in-the-episerver-ui/
I have tried this and as you've wrote it worked with the hard coded values. As soon as I switched to a method call it stopped working.
Method would return an absolute path to a defined page. That page would be defined as a content reference on the start page. Helper method works if called from any other controller.
I went back to hard coded values but things got strange. Break point wouldn't be hit at all and the URL showed just the default webhelp value.
Removed the singleton decoration - still nothing. Renamed the class - nothing. I removed it from the code, got the solution cleaned and rebuilt - still nothing.
After restarting the machine I would get the break point set on override to get hit. At last i replaced the direct call of the method to use the string interpolation format - $"{MethodCall()}"; and it worked locally. Deployed the code to DXP integration and there it worked but, further down the deployment road, it stopped working on DXP preproduction.
It didn't help with the cache purge, site restart or re-deployment. It simply doesn't register this custom Url provider.
I understand that this sounds strange but for me this is a very random behavior. Any thougths on this?
Could you try removing the ServiceConfiguration attribute, and registering your UserGuideUrlProvider like this instead?
[InitializableModule]
[ModuleDependency(typeof(ServiceContainerInitialization))]
public class UserGuideInitializer : IConfigurableModule
{
public void ConfigureContainer(ServiceConfigurationContext context)
{
context.Services.AddSingleton<UserGuideUrlProvider, CustomUserGuideUrlProvider>();
}
public void Initialize(InitializationEngine context)
{
}
public void Uninitialize(InitializationEngine context)
{
}
}
Hopefully, the ModuleDependency will do the trick :-)
If you want to update the link text too, have a look at the last part of this post:
https://www.gulla.net/no/blog/replace-the-link-to-the-optimizely-user-guide/
I was trying to find a way to change default link to webhelp.episerver.com and use one of our pages instead. Is there an easy way of acomplishing this as shown here in screen shot?