【发布时间】:2015-03-18 01:45:58
【问题描述】:
我有一个使用几个 HTML 文件和一个 CSS 文件创建的网站。我目前正在尝试切换到 Play!斯卡拉框架。出于某种原因,我很难弄清楚如何将一个 html 页面链接到另一个页面。
现在我所有的 html 文件都保存在“views”文件夹中,名称为“index.scala.html”、“aboutpage.scala.html”等。在简单的 HTML 中,要创建一个指向新页面的按钮链接,它看起来像这样:
<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>
这不适用于 Play!显然,我想我可能需要使用 Application 和 controllers 文件。您如何通过 Play! 在您的网站中创建不同的页面?
谢谢
【问题讨论】:
标签: html scala playframework-2.0