Frank Vèssia Posted December 9, 2013 Posted December 9, 2013 Every time i set access to templates, 90% of the time a page is protected I set also "Redirect to another URL". Well could be useful to have a select and choose internal page for this redirection because I usually write something like "/login/", which is enough, but I was thinking, if a day I want to change my login url? I have to edit all the access rules for my templates... 1
Martijn Geerts Posted December 9, 2013 Posted December 9, 2013 You can use your config for it. $config->login_url = '/what-you-want/'; Then from elsewhere just call: $config->login_url or wire('config')->login_url
Frank Vèssia Posted December 9, 2013 Author Posted December 9, 2013 Yes but this will change also the admin login...when my users can't access to a particular page they have to login from my custom login page, not PW login page.
Martijn Geerts Posted December 9, 2013 Posted December 9, 2013 Can be that I don't understand what you want but the admin login is called by ID: $config->loginPageID
Macrura Posted December 9, 2013 Posted December 9, 2013 you can make up your own config vars, like $config->my_special_frontend_login_url = '/login-here/'; i think that is what martijn was implying? 1
Frank Vèssia Posted December 9, 2013 Author Posted December 9, 2013 If I use the $config I have to check manually each page and redirect my users, I was talking about the template "access" panel when you can write a custom page url when a user has no access.
Macrura Posted December 9, 2013 Posted December 9, 2013 oh right - now i get it! so that panel lets you put in a custom url, and you're thinking that since it's being stored as a page path, that the concern is what if you change the page path; one idea might be the page paths history module, which would automatically handle that redirect; another idea might be to actually enter the page id in that field like /?id=1024/ and then use a module to check for urls that are page ID and rewrite them to the current url..
Frank Vèssia Posted December 9, 2013 Author Posted December 9, 2013 Yes, but i think a simple select with the page tree it's easier
Macrura Posted December 9, 2013 Posted December 9, 2013 right...i guess i would vote for that, unless there is some good reason not to, perhaps there needs to be a way to have a made up url there also (one that is using segments or get vars)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now