我正在使用带有基本模板的 webpy
render = web.template.render(basedir + 'templates/', base='layout', globals=globals_vars_custom)
在layout.html
我有类似的东西:
$def with (content)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>PAGE TITLE</title>
<!-- Some CSS and some javascript -->
</head>
<body>
$:content
</body>
</html>
这个基本模板适用于我网站的 90%,但我有一个页面,我需要在其中插入一些其他数据<head>
(一些元标记)。
我怎样才能做到这一点?如何将<head>
可以轻松覆盖的结构放入模板中?
谢谢!