forms - Silverstripe Login params -


im trying style login page. login url website/security/login. im trying locate 'login' piece of url. have done wrong below?

public function displaypagetype() {    $param = $this->request->param('action');    if ($param === 'login')     {        return 'login';     } 

thanks

i think won't work since controller during render page_controller , not security controller. $action param not equal login. index, i'm not sure.

if want check if you're in login page, can add page_controller:

public function getisloginpage() {     return $_request['url'] == '/security/login'; } 

then in template:

<body class="<%if $isloginpage %>login-page<% end_if %>"> 

a bit dirty it's quickest way know.

another way leverage silverstripe's legacy support. can add css file called tabs.css @ mysite/css/tabs.css. if file exists, silverstripe include in page.

you can create templates silverstripe automatically use if exist:

  • themes/<theme_name>/security.ss - if want login page use entirely different layout.
  • themes/<theme_name>/layout/security_login.ss - if want change content part (the $layout section)

i hope helps.


Popular posts from this blog