子页面,(实现类页面)
#{extends 'main.html' /}
#{set title:'Home' /}
#{welcome /}
模板页面(接口页面)
<!DOCTYPE html>
<html>
<head>
<title>#{get 'title' /}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/main.css'}" />
<link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}" />
</head>
<body>
#{doLayout /}
</body>
</html>
我把子页面叫做实现页面,模板页面叫接口页面是因为
在子页面里面使用的是set 和 extends
在模板页面使用的是 get doLayout
play tages的语法规则
#{ xxxx /} 如:#{get 'xxx' /} #{set xx:'xxx' /} #{extends 'xxx'/} #{welcome /}