Using Direct Edit with JSP

From OpenCms Wiki
Revision as of 16:42, 2 January 2007 by 193.17.60.126 (Talk)
Jump to: navigation, search

Caveat

If you are creating your own templates, and would like to have direct edit functionality enabled, make sure that the direct edit javascript and css code is included into your pages (don't worry - the edit-code will only be inserted for users that are logged in into the system). You can do this by putting the following tag in the the HTML header part of your jsp:

   <cms:editable/>

From that point, you can enable direct edit for individual resources by setting the editable attribute on your cms:contentload to true as follows:

   <cms:contentload collector="${property.collector}" param="${param.dir}|${param.contentType}" editable="true">
   </cms:contentload>

Within JSP templates you can control the direct edit feature by setting the editable attribute as follows:

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

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox