Resource
(→Resource Properties) |
|||
(7 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Extending OpenCms]] | ||
The [[Virtual File System]] (VFS) of Opencms contains files and folders. The general term for any item in the VFS, be it a file or a folder is ''Resource''. | The [[Virtual File System]] (VFS) of Opencms contains files and folders. The general term for any item in the VFS, be it a file or a folder is ''Resource''. | ||
Line 11: | Line 12: | ||
Resource types are also responsible to extract links to other resources from a resource. It is possible to [[Custom_File_and_Folder_Types |add new resource types]]. | Resource types are also responsible to extract links to other resources from a resource. It is possible to [[Custom_File_and_Folder_Types |add new resource types]]. | ||
− | + | === Explorer Types === | |
+ | |||
+ | [[Explorertype|Explorer types]] define how the workplace explorer handles resource types and can be used to group resource types. | ||
=== Resource Properties === | === Resource Properties === | ||
− | A property is a named string literal value attached to the resource. | + | A property is a named string literal value attached to the resource. A resource type can be associated with a set of default properties which all resources of this type share unless a resource overrides the default value. |
There are several standard properties with predefined semantics evaluated by OpenCms during work with the resource. Most prominent is the <em>Title</em> property which is used to display the user-defined title for a resource in the explorer. You can access property values from JSP templates via the [[cms_property|cms:property]] tag. | There are several standard properties with predefined semantics evaluated by OpenCms during work with the resource. Most prominent is the <em>Title</em> property which is used to display the user-defined title for a resource in the explorer. You can access property values from JSP templates via the [[cms_property|cms:property]] tag. | ||
Line 26: | Line 29: | ||
<dd>the active method in the administration view | <dd>the active method in the administration view | ||
<dt>locale-available | <dt>locale-available | ||
− | <dd>the allowed set of locales | + | <dd>the allowed set of locales (comma separated) |
<dt>templateclass | <dt>templateclass | ||
<dd>control the Java class for body. | <dd>control the Java class for body. | ||
Line 38: | Line 41: | ||
<dd>content encoding | <dd>content encoding | ||
<dt>default-file | <dt>default-file | ||
− | <dd>default file in folders | + | <dd>default file in folders - can contain a file name (no path allowed) |
<dt>Description | <dt>Description | ||
<dd>resource description | <dd>resource description | ||
Line 74: | Line 77: | ||
<dd> | <dd> | ||
<dt>relativeroot | <dt>relativeroot | ||
− | <dd>relative root link substitution | + | <dd>relative root link substitution<br> |
+ | ( a short description from Alexander Kandzior at the opencms-dev mailing list: [http://mail.opencms.org/pipermail/opencms-dev/2003q2/004722.html The relativeroot property]; some years old, but help to understand this property ) | ||
<dt>restypes.available | <dt>restypes.available | ||
− | <dd> | + | <dd>comma separated list of available resource types for the "new" dialog (e.g. article,news,binary) |
+ | <dt>restypes.indexpage | ||
+ | <dd>a list of resource types that shall be available for creation of an index file in a new folder, separated by "|" (no whitespaces in between). | ||
<dt>category | <dt>category | ||
<dd>sort search results in categories | <dd>sort search results in categories | ||
+ | <dt>search.exclude (true|false) | ||
+ | <dd>prevents the content from being indexed. | ||
+ | It should also be possible to set search.exclude to false in subfolders / files of folders with search.exclude set to true | ||
<dt>search.extractionclass | <dt>search.extractionclass | ||
<dd>define a bean for search content extraction | <dd>define a bean for search content extraction |
Latest revision as of 19:19, 2 March 2011
The Virtual File System (VFS) of Opencms contains files and folders. The general term for any item in the VFS, be it a file or a folder is Resource.
Resources in the VFS are stored in the same hierarchical manner known from other file systems. Each resource is associated with a resource type, the publication attribute (datereleased), the expiration attribute (dateexpired) and a set of properties.
Resource Types
A resource type in OpenCms identifies a certain type of file or folder along with the special methods required to work with these files or folders.
OpenCms includes a set of default resource types. They support the most common file types such as simple text and HTML files, images, PDF, MS Word and MS Excel, and XML files. OpenCms also knows special folder types, such as image galleries and link galleries which are handled in a special way. Image galleries are automatically made available to image selection dialogs anywhere in OpenCms.
Resource types are also responsible to extract links to other resources from a resource. It is possible to add new resource types.
Explorer Types
Explorer types define how the workplace explorer handles resource types and can be used to group resource types.
Resource Properties
A property is a named string literal value attached to the resource. A resource type can be associated with a set of default properties which all resources of this type share unless a resource overrides the default value.
There are several standard properties with predefined semantics evaluated by OpenCms during work with the resource. Most prominent is the Title property which is used to display the user-defined title for a resource in the explorer. You can access property values from JSP templates via the cms:property tag.
Resource properties are an important part of OpenCms and widely used. You can define your own properties and map elements of your XML content to properties.
The list below was taken from the class org.opencms.file.CmsPropertyDefinition. It is not complete yet.
- activemethod
- the active method in the administration view
- locale-available
- the allowed set of locales (comma separated)
- templateclass
- control the Java class for body.
- cache
- controls the caching
- ChannelId
- probably deprecated because the concept of channels in version 5.x seems to have been dropped
- content-conversion
- HTML cleanup control
- content-encoding
- content encoding
- default-file
- default file in folders - can contain a file name (no path allowed)
- Description
- resource description
- enable-notification
- export
- boolean indicating inclusion or exclusion from static export
- exportname
- the resource export name, during export this name is used instead of the resource name
- exportsuffix
- JSP additional suffix during static export, default is "html".
- folders.available
- control the folders where templates or default bodies should be available
- image.size
- the image geometry for image resources
- internal
- internal use (e.g. delete)
- Keywords
- resource keywords
- locale
- locale-default
- default locale of the resource
- login-form
- the login form
- NavImage
- icons to use for display of admin tools
- NavInfo
- used to group related tools in the admin view
- NavPos
- navigation position, used to determine the order of tools in the admin view
- NavText
- navigation text
- notification-interval
- relativeroot
- relative root link substitution
( a short description from Alexander Kandzior at the opencms-dev mailing list: The relativeroot property; some years old, but help to understand this property ) - restypes.available
- comma separated list of available resource types for the "new" dialog (e.g. article,news,binary)
- restypes.indexpage
- a list of resource types that shall be available for creation of an index file in a new folder, separated by "|" (no whitespaces in between).
- category
- sort search results in categories
- search.exclude (true|false)
- prevents the content from being indexed. It should also be possible to set search.exclude to false in subfolders / files of folders with search.exclude set to true
- search.extractionclass
- define a bean for search content extraction
- search.priority
- to boost certain search results
- secure
- secure transmission of resources
- stylesheet
- stylesheet of files
- template
- control the template
- template-elements
- control the template elements
- Title
- resource title
- visiblemethod
- visible method in the administration view