Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    28 days ago
    Biagio Paruolo
    0

    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>();
        }
    }
    

    Thanks

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    27 days ago
    Huw Reddick
    0

    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.

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    27 days ago
    Biagio Paruolo
    0

    Hi, sorry. I mean "Getting Started", but if you use that code, it remove the all dashboard.

    enter image description here

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    27 days ago
    Huw Reddick
    0

    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)

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    27 days ago
    Biagio Paruolo
    0

    Umbraco 13+

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    27 days ago
    Huw Reddick
    0

    Is your other dashboard a custom dashboard?

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    27 days ago
    Biagio Paruolo
    0

    yes.

    {
            "dashboards":  [
            {
            "alias": "agriPassDashboard",
            "view":  "/App_Plugins/DashBoard/dashboard.html",
            "sections":  [ "content" ],
            "weight": -10,
    
            }
            ],
            "javascript": [
            "~/App_Plugins/DashBoard/dashboard.controller.js"
            ],
            "css": [
            "~/App_Plugins/DashBoard/dashboard.css"
            ]
     }
    
  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    27 days ago
    Huw Reddick
    0

    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

    enter image description here

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    27 days ago
    Biagio Paruolo
    0

    I try again and it works.

    builder.Dashboards().Remove<ContentDashboard>();
    builder.Dashboards().Remove<RedirectUrlDashboard>();
    

    Is't better to use the composer or the manifest file?

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    27 days ago
    Huw Reddick
    0

    you can only remove them using a composer

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    27 days ago
    Biagio Paruolo
    0

    Ok..but I mean for a new dash.

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    27 days ago
    Huw Reddick
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft