我用的是露台10。
我们通过遵循这链接创建了简单的jsp模板
<%@page buffer="none" session="false" trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
<cms:enable-ade />
</head>
<body>
<div id="header">
<cms:container name="headercontainer" type="header" maxElements="1" />
</div>
<div id="window">
<cms:container name="centrecontainer" type="center" maxElements="8" detailview="true"/>
</div>
<div id="footerColumn">
<cms:container name="footercontainer" type="footer" maxElements="1"/>
</div>
</body>
</html>说是main.jsp。之后,我创建了一个新的container-page,例如my-fist-template.html,并设置了以下属性
template = /system/modules/my.first.module/templates/main.jsp然后我创建了一个新的资源类型,比如myResourceType。我还为新创建的资源类型创建了xsd和格式化程序。
之后,我打开my-fist-template.html进行编辑。我无法添加布局、简单滑块、灵活的内容等(由opencms创建的所有/默认资源类型),但I能够将新创建的资源类型myResourceType放入。
我遗漏了什么?
发布于 2016-04-23 04:35:44
如果将容器类型更改为区域或元素,则可以分别放置布局或资源类型。如下所示
<cms:container name="mycontainer" type="area" maxElements="1"/> // Here you can put layouts (and then other resource types into the layouts)
<cms:container name="myothercontainer" type="element" maxElements="1"/> // Here you can put resource types into the container directly希望这能有所帮助
https://stackoverflow.com/questions/36687220
复制相似问题