(Umbraco v14.3.0). I'm working on a view
# package-development
m
(Umbraco v14.3.0). I'm working on a view where I would like to open two different "Workspace Modals" using
UmbModalRouteRegistrationController
but I'm not sure if this is supported? Since these modals would both be routed to
/modal/umb-modal-workspace/.....
I'm not sure if this is supported and how I would do it. I've tried adding a ctrlAlias to the ctor, used
addAdditionalPath
and
addUniquePaths
but without any success. Anyone that know if this should be supported?
Never mind. I think it actually did work. In this scenario both
UMB_MY1_MODAL
and
UMB_MY2_MODAL
is using
Umb.Modal.Workspace
, This seems to work, here's the code if anyone ever have the same challange 🙂
Copy code
// routed to /modal/umb-modal-workspace/mod1/....
this.#modalCtrl1 = new UmbModalRouteRegistrationController(this, UMB_MY1_MODAL,'mod1')
  .addAdditionalPath('mod1')
  .onSetup((routingInfo) => {
    ...
  }
);

// routed to /modal/umb-modal-workspace/mod2/....
this.#modalCtrl2 = new UmbModalRouteRegistrationController(this, UMB_MY2_MODAL,'mod2')
  .addAdditionalPath('mod2')
  .onSetup((routingInfo) => {
    ...
  }
);
10 Views