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 1621 posts 1914 karma points c-trib
    Apr 04, 2024 @ 17:26
    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 1932 posts 6722 karma points MVP 2x c-trib
    Apr 04, 2024 @ 21:51
    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 1621 posts 1914 karma points c-trib
    Apr 05, 2024 @ 06:21
    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 1932 posts 6722 karma points MVP 2x c-trib
    Apr 05, 2024 @ 08:31
    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 1621 posts 1914 karma points c-trib
    Apr 05, 2024 @ 09:43
    Biagio Paruolo
    0

    Umbraco 13+

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    Apr 05, 2024 @ 10:04
    Huw Reddick
    0

    Is your other dashboard a custom dashboard?

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Apr 05, 2024 @ 10:35
    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 1932 posts 6722 karma points MVP 2x c-trib
    Apr 05, 2024 @ 11:37
    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 1621 posts 1914 karma points c-trib
    Apr 05, 2024 @ 13:24
    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 1932 posts 6722 karma points MVP 2x c-trib
    Apr 05, 2024 @ 13:33
    Huw Reddick
    0

    you can only remove them using a composer

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Apr 05, 2024 @ 13:44
    Biagio Paruolo
    0

    Ok..but I mean for a new dash.

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    Apr 05, 2024 @ 13:53
    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies