Created
October 1, 2014 21:56
-
-
Save unclecheese/8d6b91070b9dac56ef66 to your computer and use it in GitHub Desktop.
Custom login for SilverStripe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Page extends SiteTree { | |
public function IsLostPassword() { | |
return in_array(Controller::curr()->getRequest()->param('Action'), array("lostpassword","passwordsent","changepassword")); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<% base_tag %> | |
<! -- scripts, css, etc --> | |
</head> | |
<body class="login-form"> | |
$Content | |
$Form | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if IsLostPassword %><% include LostPassword %><% else %> | |
<!DOCTYPE html> | |
.... | |
</html> | |
<% end_if %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<% base_tag %> | |
<! -- scripts, css, etc --> | |
</head> | |
<body class="login-form"> | |
$Form | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment