Frage

As mentioned in the documentation, http://securesocial.ws/guide/views-customization.html I have created a CustomTemplatesPlugin which extends TemplatesPlugin and implemented the getLoginPage function

@Override
public Html getLoginPage(Request arg0,
Form> arg1, Option arg2) {
//Logger.info(" In getLoginPage");
return views.Registration.html.login(arg1,arg2);
}

I have created a folder called Registration under views and then copied the login.scala.html file from securesocial into that folder.

when I tried to access localhost:9000/login, I received a not found: value requestheader error, so I modified the first line in login.scala.html to

@(loginForm:play.api.data.Form[(String,String)],
> errorMsg: Option[String] = None)(implicit request:
> play.api.mvc.RequestHeader)

After that I tried again in the browser. The following error is being listed now.

not found: value provider
In E:\playtest\ss\app\views\Registration\login.scala.html at line 40.
37

@Messages("securesocial.login.instructions")


38

39 @for(p <- externalProviders) {
40 @provider(p.id)

}
}

Please let me know the steps to be done before attempting to customize the views. The default template flow works fine with no problems, I am using play 2.1.0

Thanks

War es hilfreich?

Lösung

The default template uses a provider.scala.html file. Copy that to your app as well and @provider will work.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top