1.我们portal创建一个模板配置文件index.json:
{
"name": "首页",
"action": "portal/Index/index",
"description": "首页模板文件",
"order": 5.0,
"more": {
"vars": {
"name": {
"title": "姓名",
"value": "",
"type": "text",
"placeholder": "请填写用户姓名",
"tip": "设置后您的姓名将会显示在首页",
"rule": {
"require": true
}
}
}
}
}
修改模板文件index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{$theme_vars.name|default='知末'}的网站</title>
</head>
<body>