This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

queengab2
queengab2

Hi to all,

I have website actually in mantainance mode. I'd like to grant the preview of the front-end for certain users. So i tried to add login form at mantainance page.

Create a mantanaince layout in which i call frameork extra, script and jquery.js (that i copy from demo theme, sure that it works) Create a mantainance page with account component with url /mantainance:code? Than added session component to all layouts

And it don't works

than i study relax theme by daftpunk and use this form and added to mantainance page to login directly call ajax component from here: https://github.com/rainlab/relax-theme/blob/master/partials/snippets/login.htm

Naturally the form works but i 'm redirect to mntainane page. I think that could be a funcion onRun that fire mantainance page when user is logged but honestly can't figure out how to do it.

Thanks! Bye

Last updated

queengab2
queengab2

Hi to all, now all is clear! Excuse me for latest post. For all who are new to october and are interested on closing site for some reason i explain my logic, hoping now is correct...

October developers divide backend users and front-end users for security reason. And this is a very good news. So if you active your mantainance mode you can enter only as backend user, and it's right! Beacuse you are in mantainance, and nobody can view your site except the developers.

If you want instead to deny some pages to public and grant access only to some users you can use user.plugin by rainlab.

In my special case i had to completely hide my site but allow my customer to view the site as a preview.

So i installed the plugin, create a layout for a landing page, and a page mantainance that i use to redirect my site fro public users.

Than use the mantainance layout to create another page login. To this page i drag the account component of the user plugin. Remember to insert {% framework %}{% framework extras %} to yuor layout in order to account page work correctly. Besides load in the page or in the layout jquery.js to run ajax onSignin handler.

Then drag the session component to all layout or page you want to close. Surely if you drag the component on layout is better beacuse you will close all pages that load the specific layout.

If tou want to ovveride the view of the default account partial you can create a partial account/default.htm

That's all! Bye Gabriele

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.