I have a website that I have made using several HTML files and one CSS file. I am currently attempting to switch over to the Play! Scala Framework. For some reason I am having a really hard time figuring out how to link one html page to another.
Right now all my html files are saved in the 'views' folder with names such as "index.scala.html", "aboutpage.scala.html" and so on. In simple HTML, to create a button link to a new page it looks something like this:
<form action="index.html" method="get">
<button class="navlink">Home</button>
</form>
<form action="aboutpage.html" method="get">
<button class="navlink">About Us</button>
</form>
<form action="publications.html" method="get">
<button class="navlink">Publications</button>
</form>
This does not work on Play! obviously, I think I may need to work with the Application and controllers files. How do you go about creating different pages in your website through Play!?
Thanks
Check out the documentation for Reverse Routing:
Assuming you have a route like this:
You can change your HTML to this: