[Solved] Umbraco 14 entityAction for Media
# help-with-umbraco
h
Does any one know how to add an action to the Media section? I have successfully added one for Members but can't figure out how to add one to the Media action menu. I assume that perhaps my entityType may be incorrect, is there any info on what these should be.
This is my manifest.ts
Copy code
import { UMB_MEDIA_ENTITY_TYPE } from "@umbraco-cms/backoffice/media";
import { ManifestEntityAction } from "@umbraco-cms/backoffice/extension-registry";
import { MediaEntityAction } from "./media.entity.action";

const entityAction: ManifestEntityAction = {
    type: 'entityAction',
    kind: 'default',
    alias: 'media.entity.action',
    name: 'media action',
    weight: -100,
    forEntityTypes: [
        UMB_MEDIA_ENTITY_TYPE
    ],
    api: MediaEntityAction,
    meta: {
        icon: 'icon-message',
        label: 'Resend Validation',

    },
    conditions: [{
        alias: "Umb.Condition.SectionAlias",
        match: "Umb.Section.Media"
    }]
}

export const manifests = [entityAction];
l
The manifest looks correct to me. You could try adding
UMB_MEDIA_ROOT_ENTITY_TYPE
to the
forEntityTypes
, but then it depends if you want the entity-action at the root or not? 🤔 Do you know if it appears in Settings > Extension Insights listing? Wondering if there's alias clash?
h
Will try that and check 🙂
It doesn't appear in Extension Insights
I have it working now, I think it didn't like the Alias, I changed it to Umb.EntityAction.Media.Info and now it is appearing on the menu. 😄
19 Views