Reputation: 113
here is my piece code:
<div id="account"><a href="@routes.Contacts.blank()">Contact</a></div>`
instead of it, i use above code
<div id="account"><a href="account.html">Contact</a></div>
So, i want to direct load static html page on index page.
Please help me.
Tank's
Upvotes: 1
Views: 2094
Reputation: 29433
You can map the index page to a static file by creating a route in your conf/routes
file, like:
GET / controllers.Assets.at(path="/public", file="index.html")
GET /*file controllers.Assets.at(path="/public", file)
Upvotes: 10
Reputation: 55798
You need to create a route in conf/routes
file pointing some action ie:
GET /contact controllers.Contacts.blank
so then you can build links with typed routes (strongly recommended):
<a href="@routes.Contacts.blank()">Contact</a>
or you can write it as a hardcoded path. What's important - it MUST fit second part of your route in the final HTML code
You can also write routes with *.html
'extension' BUT it's completely unnecessary as browsers recognizes response by its header not the path!
GET /contact.html controllers.Contacts.blank
Upvotes: 0