Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

redirect to Login-Page


Go to End


4 Posts   2158 Views

Avatar
Leo1305

Community Member, 6 Posts

28 September 2009 at 1:44am

Hi,

i´ve got a page named "secured content" which is only access able for the group "school". is it possible that the page is shown for all people but if you aren´t logged in you´ll redirected to /Security/Login and back to referer ?

thanks

leo

Avatar
zenmonkey

Community Member, 545 Posts

29 September 2009 at 1:03pm

If you use <% control AllChildren %> in the menu you will get links to Logged in only pages. When you click on that link it should automatically redirect you to the login page

Avatar
Leo1305

Community Member, 6 Posts

1 October 2009 at 6:53am

i´ve updated the navigation.ss. if i press on secured content now i get following message:

That page is secured. Enter your credentials below and we will send you right along.

but no login forms... in my addressline is typed http://www.momentsforever.net/Security/login !

if i type http://www.momentsforever.net/Security/login i´m getting login forms :/

Avatar
Dave L

Community Member, 60 Posts

1 October 2009 at 11:51am

Do you have $Form in your main template? Security forms are rendered into $Form not, $Content, so you need to have this variable.