I’m able to create html links the following way:
<a href="/about">About Us</a>
This will follow the routing for /about. But on the following pages (I know it’s for an earlier version of Play, but I couldn’t find any info for 2.0.1):
http://www.playframework.org/documentation/1.1/tags
playframework how to call method from html in href that takes one parameter?
The link is obtained from the routing file. I have the routing for the above link defined as:
GET /about controllers.Application.about()
In PlayFramework2, how can I programmatically get the routing to happen by passing in the controller and function name?
Use this in the template:
in your case:
also you can use router in the controller with similar syntax: