1792 Posts in 588 Topics by 560 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1831 Views |
-
Overriding Login Template and Class

23 January 2010 at 1:14am
Hi,
I've to create a new template for login page, but I don't understand how made it. I create a new class MyMemberLoginForm that extend MemberLoginForm and MyMemberLoginForm.ss, but don't works.
Into class; Iwrite only declaration, because I don't add any new fields or overriding function.
class MyMemberLoginForm extends MemberLoginForm {
}
Then Into config file , I add Object::useCustomClass('MemberLoginForm', 'MyMemberLoginForm ');
How are the right steps?
Thank you
-
Re: Overriding Login Template and Class

29 January 2010 at 7:45am
I think you need to declare the new template in MyMemberLoginForm
function forTemplate() {
return $this->renderWith(array(
$this->class,
'Form'
));
}
And then make a template
http://doc.silverstripe.org/doku.php?id=form#using_a_custom_template
| 1831 Views | ||
|
Page:
1
|
Go to Top |

