Copied to clipboard

Flag this post as spam?

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


  • Chris Hall 26 posts 99 karma points
    Dec 06, 2024 @ 18:25
    Chris Hall
    0

    U15 - Umbraco UI - Customise content editor tabs

    I have totally hit a brick wall with the limits of my understanding of the new Lit / Umbraco UI framework. Having scoured the docs and read several articles, i'm still having a hard time piecing together what I need to do.

    I would like to be able to tap into the rendering of tabs within content editor views- uui-tab element in the UI framework

    I would like to be able to determine the culture of the currently edited language variant of the page, and programatically disable/enable a tab based off this culture.

    I'm utterly lost at how to achieve this though. My closest attempt came as far as trying to register a controller that I'd hoped I could access what I needed from, but I'm lost as to what conditions to use.

    import { umbExtensionsRegistry } from "@umbraco-cms/backoffice/extension-registry"
    
    const manifest = {
        type: 'disableTabsContext',
        alias: 'DisableTabsContext.Disabler',
        name: 'Disable Tabs Context',
        api: 'disable-tabs.context.js',
        conditions: [
            {
                alias: 'Umb.Condition.WorkspaceAlias',
                match: 'Umb.Workspace.Document',
            }
        ]
    };
    
    umbExtensionsRegistry.register(manifest);
    

    The manifest gets regsitered, however, I thnk this condition is wrong and never fires as I can see in Chrome tools Sources tab, that my disable-tabs.context.js never gets loaded.

    If anyone could point me in the right direction i'd be eternally grateful!

  • 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