Site aware uri mapping app / headless mode

20 views
Skip to first unread message

Christoph Damm

unread,
Nov 25, 2024, 9:42:10 AM11/25/24
to Magnolia User Mailing List
Hello,

we are working headless with Magnolia CMS and NextJS apps and a multisite setup.
Currently we implemented our own endpoint which in general resolves a site when rendering a page (as we have other configurations at the site level), that also checks for uri mappings which might exist.

Now we use the uri mapping app and have the requirement to store also the mappings per site.
Of course we can decorate the uri mapping app to add a site name etc, but how would be the best to access is?
As far as i can see the app itself is not yet multi-site capable.
Is there an alternative?
Otherwise i guess we would further have to extend the uri mapping app to be able to store/handle multisite rules.

Thanks for any direction,

cheers

Christoph

Christoph Damm

unread,
Nov 26, 2024, 4:30:47 AM11/26/24
to Magnolia User Mailing List
Hello everyone,
i could simply solve my issue by extending the ExtendedVirtualUriRegistry with my own registry, in order to return the new field within the getRawViewFromNode.
This way i can get all the providers, match if site matches and only check those uri mappens consequently.

Cheers

Christoph
Reply all
Reply to author
Forward
0 new messages