没有合适的资源?快使用搜索试试~ 我知道了~
<!-- 设置静态导出访问链接前缀(Online下链接地址前缀) --> <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix> <!-- 设置静态导出预览前缀(Offline下链接地址前缀) --> <vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix> <!-- 设置静态导出时是否使用相对 路径 --> <userelativelinks>false</userelativelinks> <!-- 设置404导出URL的值 --> <exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl> <!-- 暂不清楚此项作用 --> <plainoptimization>true</plainoptimization> <!-- 判断测试文件是否存在来决定是否执行全部导出 -->
资源推荐
资源详情
资源评论
opencms自定义文章类型
第一步:创建模块,使用管理员视图添加自定义模块
第二步:在新增模块schemas目录下新增xsd文件,文件内容如下:
/system/modules/com.mysite.example/schemas/article.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:include schemaLocation="opencms://system/modules/com.mysite.example/schemas/basic.xsd" />
<xsd:include schemaLocation="opencms://system/modules/com.mysite.example/schemas/content.xsd" />
<xsd:element name="ArticleTypes" type="OpenCmsArticleTypes" />
<xsd:complexType name="OpenCmsArticleTypes">
<xsd:sequence>
<xsd:element name="ArticleType" type="OpenCmsArticleType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsArticleType">
<xsd:sequence>
<xsd:element name="basic" type="OpenCmsBasicType" />
<xsd:element name="content" type="OpenCmsContentType" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional" />
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundle name="com.mysite.example.workplace" />
<mappings>
<mapping element="basic/title" mapto="property:Title" />
第一步:创建模块,使用管理员视图添加自定义模块
第二步:在新增模块schemas目录下新增xsd文件,文件内容如下:
/system/modules/com.mysite.example/schemas/article.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:include schemaLocation="opencms://system/modules/com.mysite.example/schemas/basic.xsd" />
<xsd:include schemaLocation="opencms://system/modules/com.mysite.example/schemas/content.xsd" />
<xsd:element name="ArticleTypes" type="OpenCmsArticleTypes" />
<xsd:complexType name="OpenCmsArticleTypes">
<xsd:sequence>
<xsd:element name="ArticleType" type="OpenCmsArticleType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsArticleType">
<xsd:sequence>
<xsd:element name="basic" type="OpenCmsBasicType" />
<xsd:element name="content" type="OpenCmsContentType" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional" />
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundle name="com.mysite.example.workplace" />
<mappings>
<mapping element="basic/title" mapto="property:Title" />
<mapping element="basic/datereleased" mapto="attribute:datereleased" />
<mapping element="basic/keywords" mapto="property:Keywords" />
<mapping element="basic/summary" mapto="property:Description" />
</mappings>
<defaults>
<default element="basic/datereleased" value="${currenttime}" />
<default element="basic/author" value="${currentuser.fullname}" />
</defaults>
<layouts></layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
/system/modules/com.mysite.example/schemas/basic.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:element name="BasicTypes" type="OpenCmsBasicTypes" />
<xsd:complexType name="OpenCmsBasicTypes">
<xsd:sequence>
<xsd:element name="BasicType" type="OpenCmsBasicType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsBasicType">
<xsd:sequence>
<xsd:element name="title" type="OpenCmsString" />
<xsd:element name="keywords" type="OpenCmsString" />
<xsd:element name="tags" type="OpenCmsString" />
<xsd:element name="author" type="OpenCmsString" />
<mapping element="basic/keywords" mapto="property:Keywords" />
<mapping element="basic/summary" mapto="property:Description" />
</mappings>
<defaults>
<default element="basic/datereleased" value="${currenttime}" />
<default element="basic/author" value="${currentuser.fullname}" />
</defaults>
<layouts></layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
/system/modules/com.mysite.example/schemas/basic.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:element name="BasicTypes" type="OpenCmsBasicTypes" />
<xsd:complexType name="OpenCmsBasicTypes">
<xsd:sequence>
<xsd:element name="BasicType" type="OpenCmsBasicType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsBasicType">
<xsd:sequence>
<xsd:element name="title" type="OpenCmsString" />
<xsd:element name="keywords" type="OpenCmsString" />
<xsd:element name="tags" type="OpenCmsString" />
<xsd:element name="author" type="OpenCmsString" />
剩余6页未读,继续阅读
资源评论
胡戈的风
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功