How to remove the Welcome Tab from Content Dashboard?
How to remove the Welcome Tab from Content Dashboard?
This code remove all Content Dashboard:
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Dashboards;
using Umbraco.Cms.Core.DependencyInjection;
namespace Umbraco.Docs.Samples.Web.Dashboards;
public class RemoveDashboard : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Dashboards().Remove<ContentDashboard>();
}
}
not sure why tis isn't working for you, I just fired up a new 13.2.2 instance, added a custom dashboard then removed the contentdashboard using the composer.
It removes the getting started but my custom dashboard remains
How to remove the Welcome Tab from Content Dashboard?
How to remove the Welcome Tab from Content Dashboard? This code remove all Content Dashboard:
Thanks
Do you mean the "Getting Started" there is no Welcome Tab by default.
The code you posted should remove the "Getting Started" If you have a tab called Welcome then it was probably installed by a plugin.
Hi, sorry. I mean "Getting Started", but if you use that code, it remove the all dashboard.
Mmm, it should only remove the getting started.
What version of Umbraco are you using?
Is your other dashboard a custom dashboard? (it may be setup incorrectly)
Umbraco 13+
Is your other dashboard a custom dashboard?
yes.
not sure why tis isn't working for you, I just fired up a new 13.2.2 instance, added a custom dashboard then removed the contentdashboard using the composer.
It removes the getting started but my custom dashboard remains
I try again and it works.
Is't better to use the composer or the manifest file?
you can only remove them using a composer
Ok..but I mean for a new dash.
For a new dashboard you would either use a package.manifest or create an IDashboard instance, no composer involved for these
https://docs.umbraco.com/umbraco-cms/extending/dashboards
is working on a reply...