- 浏览: 495988 次
- 性别:
文章分类
- 全部博客 (369)
- Java (48)
- Struts (1)
- Spring (4)
- Hibernate (7)
- WebServices (2)
- XML (3)
- web服务器 (12)
- PHP (16)
- FLEX (13)
- Flash (7)
- JavaScript (35)
- Ajax (4)
- Jquery (18)
- EXTJS (7)
- CSS (7)
- HTML (7)
- JSON (5)
- 好玩的 (1)
- 其他 (21)
- Oracle (35)
- mysql (12)
- Linux (12)
- JDBC (2)
- EJB3 (1)
- AOP (1)
- 正则表达式 (6)
- JSF (1)
- 设计模式 (1)
- RBAC (1)
- PowerDesigner (1)
- windows (1)
- 电脑工具软件 (3)
- SEO (3)
- maven (13)
- cms (9)
- JSP (5)
- jpbm (1)
- eclipse (8)
- sql (4)
- android (3)
- 浏览器 (5)
- 国外IT网站 (1)
- 文摘 (1)
- 文档 (31)
- doc命令 (1)
- webgl (1)
- html5 (1)
- ant (1)
- mongodb (0)
- 操作系统 (1)
- Dreamweaver (1)
- hadoop (2)
- xpath (1)
- nutch (1)
- window (1)
- xm (2)
- excel (1)
- httpclient (0)
- YII (2)
- CXF (1)
- Quartz (1)
- jsoup (2)
- wifi (2)
- logback (1)
- 硬件 (1)
- 工具 (3)
- freemark (1)
- ide (2)
- mail (1)
- log (1)
- ueditor (1)
- 链接 (1)
- reaver (2)
- js (1)
- .net (1)
- chrome (1)
- git (1)
- Docker (1)
- unicode (1)
- 多线程 (1)
- 并发 (1)
- Nashorn (3)
- Angular (1)
- curl (1)
- Cygwin (1)
- nashron (1)
- Babel (1)
- React Native (1)
- sip (1)
- openmeetings (1)
- IDEA (0)
- CAS (1)
最新评论
-
沉醉音乐的咖啡:
使用 preventDefault() 函数来阻止对表单的提交。 -
PhoenixHorse:
原表的索引啥的不就失效了吗
oracle修改表精度 -
yupengcc:
资料带走 3Q
RBAC模型 -
Java路:
...
JSON-LIB快速入门(转) -
damoqiongqiu:
utf-8下,E文字符占1个字节,中文字符占3个字节。如果一个 ...
AS3:截取定长度的字符串
The <cms:contentload>
tag
This tag loads a collection of xml content resources. Depending on the collector given in the collector attribute, either a single xml content resource or a list of resources is loaded which will be looped in this tag.
Attributes:
Name | Description | Required |
collector |
The collector to read the xml content resources. Collectors are defined in java classes which are configured in the opencms-vfs.xml configuration file. OpenCms contains already a class CmsDefaultResourceCollector which is an aggregation of the following collectors: singleFile Other collectors are available in the class CmsPriorityResourceCollector which sorts resources by the values of the properties "collector.priority" and "collector.date". The following collectors can be used from this class: allInFolderPriorityDateDesc Instead of specifying the collector name hardwired in the collector attribute, the name of the collector can also be specified in a macro expression telling the attribute to read the collector name from a property "collector" on the JSP page, e.g.: %(property.collector) |
yes |
param |
The param attribute is used to give additional information to the collector. When using one of the collectors in CmsDefaultResourceCollector, the param attribute provides additional information about the resource name of xml content resources to be read by the collectors. The format of this parameter is: "[filename]|[resource type]|[count]"
Again you are free to use macro expressions in the param attribute to set the value of the collector's param, e.g.: %(property.xml-content) |
|
editable |
This attribute defines if the xml content supports the direct edit feature. The following values are supported: |
|
preload |
This attribute defines if the collector will proload itts content. This is required to check if the collector has returned any results at all, which can be done in combination with the The following values are supported: true Activates the preload |
Body:
Any HTML, JSP or JSTL code of your template, this code will be looped if the selected collector will return more than one xml content items.
Example usage:
A detail view of a xml content resource would use a contentload tag as following:
<cms:contentload collector="singleFile" param="%(opencms.uri)" editable="true"> ... </cms:contentload>
An example to read all xml content resources of the resource type 11 in a sub tree starting with the folder "/xml-content/" in the current site. You need to set a property "collector" with the value "allInSubTree" on the JSP, together with a property "xm-content" with the value "/xmlcontent/":
<cms:contentload collector="%(property.collector)" param="%(property.xml-content)article_%(number).html|11" editable="true" preload="true"> ... </cms:contentload>
An example for preloading content and check if there are any results returned.
<cms:contentload collector="%(property.collector)" param="%(property.xml-content)article_%(number).html|11" editable="true"> <cms:contentinfo var="info" /> <!-- use "info" for validation --> <c:if test="${info.resultSize > 0}"> <cms:contentload> <!-- the nested contentload must be used to display the xml content --> </cms:contentload> </cms:contentload>
发表评论
-
opencms文档
2012-02-12 16:15 1066opencms文档 -
http://www.opencms-forum.de 的一篇 page hit counter
2010-08-27 15:52 1612RIA知识库 flex RIA Jason ... -
page hit
2010-08-27 15:39 887http://www.opencms-forum.de/ope ... -
opencms 去掉两个/opemcms路径的方法
2010-08-17 11:35 1972RIA知识库 flex RIA http://opencm ... -
cms书籍
2010-08-12 20:30 675链接 http://hi.baidu.com/guiwenpe ... -
opencms取得全站一二级导航
2010-08-12 17:34 1599RIA知识库 flex RIA 取得当前位置导航和下一级导 ... -
opencms<cms:include>标签使用
2010-08-10 16:46 1867list.jsp <%@ taglib prefix ... -
opencms 取得下一级导航
2010-08-10 16:25 1321<%@ page import="java ...
相关推荐
例如,要从数据库中获取一个内容并显示在页面上,可以使用<cms:contentload>标签,配合API中的ContentManager类来实现。 2.3 常用API 2.3.1 常见对象和方法 ContentManager是访问内容的主要接口,其方法如...
- `<CMS:CONTENTLOAD>`:加载内容。 - `<CMS:CONTENTCHECK>`:检查内容状态。 - `<CMS:CONTENTLOOP>`:循环遍历内容。 - `<CMS:CONTENTSHOW>`:显示内容。 - `<CMS:EDITABLE>`:标记可编辑区域。 - `<CMS:INFO...
- **<CMS:CONTENTLOAD>**:加载内容。 - **<CMS:CONTENTCHECK>**:检查内容状态。 - **<CMS:CONTENTLOOP>**:循环显示内容。 - **<CMS:CONTENTSHOW>**:显示内容详情。 - **<CMS:EDITABLE>**:使内容可编辑。 - **...
`<opencms:contentquery>`标签将根据这些参数来执行分页查询。 此外,OpenCMS还提供了一些辅助方法,例如计算总页数和判断是否为首页或尾页,以便在JSP中生成正确的导航链接。这通常会涉及一些逻辑判断,例如: ``...
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/> <!-- 定义了一个名为 Cntvs 的元素 --> <xsd:element name="Cntvs" type="OpenCmsCntvs"/> <!-- 定义了 OpenCmsCntvs 类型 --> <xsd:...
- `<CMS:CONTENTLOAD>`: 加载内容。 - `<CMS:CONTENTCHECK>`: 检查内容状态。 - `<CMS:CONTENTLOOP>`: 循环遍历内容集合。 - `<CMS:CONTENTSHOW>`: 显示内容。 - `<CMS:EDITABLE>`: 允许编辑内容。 - `<CMS:...
`<cms:contentload>` 是OpenCms提供的核心标签之一,用于加载内容。在这个例子中,我们使用它来获取指定路径 `/test/news_%(number).html` 下的 `testnews` 类型的新闻内容。`%(number)` 是OpenCms的变量替换语法,...
##### 5.7 <CMS:CONTENTLOAD> - **作用**: - 加载指定ID的内容项。 ##### 5.8 <CMS:CONTENTCHECK> - **功能**: - 检查内容是否存在或是否可编辑。 ##### 5.9 <CMS:CONTENTLOOP> - **用途**: - 遍历一组内容项,...
- 常用标签:详细解释了如<CMS:USER>、<CMS:PROPERTY>、<CMS:LINK>等标签的使用方法,以及如何创建导航条、导航列表等。 6. FLEXCACHE缓存机制: - FLEXCACHE介绍:介绍了FLEXCACHE缓存机制的作用,包括实例和...
OpenCMS 是一款基于 Java 和 JSP 的开源内容管理系统(Content Management System, CMS)。它可以帮助用户轻松地构建、管理和发布网站内容。OpenCMS 提供了丰富的功能,如多语言支持、工作流管理、版本控制等,适用于...
CHARSET=<cms:property name="content-encoding" default="UTF-8"/>"/> </head> <body> <h2>测试网站的模板</h2> <cms:include element="body"/> </body> </html> ``` 这个模板使用了OpenCms的标签库来动态...
- `<cms:contentloop>`:用于循环展示内容集合。 - **对象模型**: - 介绍了OpenCMS的对象模型及其用途。 - 包括文件、目录、用户等基本对象的管理。 - **配置文件作用**: - `workplace.properties`文件用于...
<Context docBase="C:/Program Files/OpenCms/webapps/opencms" path="/opencms" debug="0" reloadable="true"/> ``` 5. **配置数据库连接**:修改OPENCMS的`WEB-INF/classes/opencms-system.xml`文件,配置...
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix> <!-- 设置静态导出预览前缀(Offline下链接地址前缀) --> <vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix> <!-- 设置静态导出时是否使用相对...
< url>smb://Admin:admin@localhost:1446/OPENCMS/</ url> < module>org.marmots.opencms.samplesite</ module> 套餐目标 生成 opencms 模块 manifest.xml 并将其与所有资源、类和库打包在一起。 配置属性 < module...