I know that a package developer can set a “weight” for a dashboard, but I’m wondering if there is a good way for me as user to control the order from many different extensions?
E.g. if I don’t agree with the weights that different extension developer gave their dashboard extension?
Agree completely—the road to progress with Umbraco of late means everything isn’t quite as plug-and-play or straightforward as it used to be. At least AI is here to help pick up the slack to restore parity!
Appreciate you sharing your findings.
The simple one would be via the entry point(similar as in Mike comment, assuming they are registered at the time)
Then grab the manifest you want to alter, unregister it, and register a new altered version, same Alias, so same extension, Just one value is changed.
const coreManifest = extensionRegistry.getByAlias(REDIRECT_MANAGEMENT_DASHBOARD_ALIAS);
if (!coreManifest) return;
const newManifest = {
...coreManifest,
weight: 1234
}
extensionRegistry.unregister(coreManifest.alias);
// Maybe you need to wait one JS Cycle here; not sure, but try without for a start.
extensionRegistry.register(newManifest);
The other option, maybe a prettier version, would be to make yours a new one that overwrites the core one:
I hope that helps — the reason why it is not a supported feature is that we haven’t seen the need for such so far. And what are the potential troubles of having other manipulating manifests.
But we support appending conditions as mike mentioned.