Cms:container
(Created page with "== cms:container tag == This page extends the <tt>opencms.tld</tt> scarce documentation for the <tt>cms:container</tt> tag. <tag> <description> This ta...") |
(Added example) |
||
Line 6: | Line 6: | ||
This tag enables the template mechanism for container pages. | This tag enables the template mechanism for container pages. | ||
</description> | </description> | ||
− | <name>container</name> | + | <name>'''container'''</name> |
<tag-class>org.opencms.jsp.CmsJspTagContainer</tag-class> | <tag-class>org.opencms.jsp.CmsJspTagContainer</tag-class> | ||
<body-content>empty</body-content> | <body-content>empty</body-content> | ||
Line 14: | Line 14: | ||
=== name === | === name === | ||
<attribute> | <attribute> | ||
− | <name>name</name> | + | <name>'''name'''</name> |
<required>true</required> | <required>true</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
Line 24: | Line 24: | ||
=== type === | === type === | ||
<attribute> | <attribute> | ||
− | <name>type</name> | + | <name>'''type'''</name> |
<required>false</required> | <required>false</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
Line 34: | Line 34: | ||
=== maxElements === | === maxElements === | ||
<attribute> | <attribute> | ||
− | <name>maxElements</name> | + | <name>'''maxElements'''</name> |
<required>false</required> | <required>false</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
Line 42: | Line 42: | ||
=== width === | === width === | ||
<attribute> | <attribute> | ||
− | <name>width</name> | + | <name>'''width'''</name> |
<required>false</required> | <required>false</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
Line 50: | Line 50: | ||
=== tag === | === tag === | ||
<attribute> | <attribute> | ||
− | <name>tag</name> | + | <name>'''tag'''</name> |
<required>false</required> | <required>false</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
Line 56: | Line 56: | ||
<small>opencms.tld</small> | <small>opencms.tld</small> | ||
− | The default tag name that will be rendered is '''<tt>div</tt>''', but this can be overriden | + | The default tag name that will be rendered is '''<tt>div</tt>''', but this can be overriden (see the [[#example | example below]]). |
=== tagClass === | === tagClass === | ||
<attribute> | <attribute> | ||
− | <name>tagClass</name> | + | <name>'''tagClass'''</name> |
<required>false</required> | <required>false</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
</attribute> | </attribute> | ||
<small>opencms.tld</small> | <small>opencms.tld</small> | ||
+ | |||
+ | Sets the <tt>class</tt> of the rendered tag (see the [[#example | example below]]). | ||
=== detailView === | === detailView === | ||
<attribute> | <attribute> | ||
− | <name>detailview</name> | + | <name>'''detailview'''</name> |
<required>false</required> | <required>false</required> | ||
<rtexprvalue>true</rtexprvalue> | <rtexprvalue>true</rtexprvalue> | ||
Line 74: | Line 76: | ||
</tag> | </tag> | ||
<small>opencms.tld</small> | <small>opencms.tld</small> | ||
+ | |||
+ | Sets if the current container is target of detail views. | ||
+ | |||
+ | == Example == | ||
+ | |||
+ | The jsp template code: | ||
+ | |||
+ | <cms:container name="infocontainer" tag="code" tagClass="myClass" /> | ||
+ | |||
+ | Will rendered: | ||
+ | |||
+ | <code id="infocontainer" class="myclass GH3XNNECNL"></code> |
Revision as of 10:33, 21 August 2012
Contents |
cms:container tag
This page extends the opencms.tld scarce documentation for the cms:container tag.
<tag> <description> This tag enables the template mechanism for container pages. </description> <name>container</name> <tag-class>org.opencms.jsp.CmsJspTagContainer</tag-class> <body-content>empty</body-content> opencms.tld
cms:container attributes
name
<attribute> <name>name</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> opencms.tld
Sets the container name. It will be rendered as the id value of the tag.
type
<attribute> <name>type</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> opencms.tld
The type attribute can be used to select which formater will be used: "Which formatter JSP is used for which container can be configured either in the resource type schema or in the site map configuration" Creating OpenCms 8 Container Templates#Formatter Configuration
maxElements
<attribute> <name>maxElements</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> opencms.tld
width
<attribute> <name>width</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> opencms.tld
tag
<attribute> <name>tag</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> opencms.tld
The default tag name that will be rendered is div, but this can be overriden (see the example below).
tagClass
<attribute> <name>tagClass</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> opencms.tld
Sets the class of the rendered tag (see the example below).
detailView
<attribute> <name>detailview</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> opencms.tld
Sets if the current container is target of detail views.
Example
The jsp template code:
<cms:container name="infocontainer" tag="code" tagClass="myClass" />
Will rendered:
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, eiffel, fortran, freebasic, gml, groovy, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, perl, php, php-brief, plsql, python, qbasic, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, z80