Création fomr pages without connection
Hello
We need to develop a web application using Metronic template backoffice (vuejs) but we need also to create several form pages without backoffice connection.
I was testing to create those form pages, so I added a second app in main.ts (called appForm) and I add div id #appForm in index.html and I created a new router with routes with meta:middleware:false and a new layout... but when I try a route, for exemple, myprojet/formpage it is redirect to myprojet/formpage#/sign-in ...
So I want to ask you if you could explain me how could I create those form pages without connection...
Thank you in advance for your help.
Tania
Replies (1)
Hi Tania Gaitan,
Thank you for reaching out to us.
I think instead of adding a new app you can handle this with user roles.
We are using middleware meta in router/index.ts, to mark routes that require authentication.
if (to.meta.middleware == "auth") {
if (authStore.isAuthenticated) {
next();
} else {
next({ name: "sign-in" });
}
} else {
next();
}
For your requirement, you can add new middleware to mark routes for different users.
Regards,
Lauris Stepanovs,
Keenthemes Support Team