Maybe someone can point me into the
# package-development
p
Maybe someone can point me into the right direction. I am trying to make a workspaceview for my custom workspace, but when I get everything registered, it will just redirect the entity to my workspaceview pathname. (So https://localhost:44324/umbraco/section/SeoToolkit/workspace/seoToolkit-module/edit/cdf429d1-2380-4ac2-ac3e-22d619ee4529 -> https://localhost:44324/umbraco/section/SeoToolkit/workspace/seoToolkit-module/view/content) and I have no clue why it does that 😅
I basically just want it to append the /content at the end of the link like how all the other workspaceviews work
Yep, can't figure it out 😦 Added a workspace context, but that doesn't change anything. Tried to look at the Umbraco source but that doesn't make it any clearer to me. Code is here if anything wants to take a look: https://github.com/patrickdemooij9/SeoToolkit.Umbraco/tree/dev/main/src/SeoToolkit.Umbraco.Common/assets/src
Completely ended up rewriting it. Still have the jump, but hopefully (fingers crossed) I can get around it
n
Hi @Patrick de Mooij I just skimmed your code. I have a hard time finding out where you registere your workspace? But I have a few hints and maybe a solution for you: To avoid explicitly doing this:
extensionRegistry.register(...)
I can recommend looking at the
bundle
extension type. https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/bundle I did notice one thing, which is that you spin up your Workspace Context in your Workspace Element — This was an early way of doing it, now you can point to your context as the
api
of your Workspace Manifest. (The element will get a reference to it, if you make a property called
api
) I would say you can find good inspiration, in the Webhook Workspace in Core. This utilizes a
kind
called
routable
which gives you a default workspace element, So you will see this manifest only declare a context for it(via the
api
property). And if you look closer in that context, you see how you declares the routes for it. That gives you the base for a workspace with routes(like routable actions, like create and edit) https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/617b3aed9e89925e5a6adbd8d021bd64708cf3a7/src/packages/webhook/workspace/webhook/manifests.ts I hope that will work for you 🙂
p
Ah thanks @Niels Lyngsø ! Will check out your examples and go from there.
7 Views