<![CDATA[Paste Script Demo]]> With OpenCms 8 it is possible to define contents types, where you can paste scripts like Facebook Like button directly in the xml content editor.

You have to define different areas inside of the element formatter using ${cms.edited} variable. If the page have been reloaded the part of the html code containing the pasted scripts is displayed. If the element have been edited or moved the alternative part of the html without scripts is displayed. In the last case the user can be reminded to reload the page.

 

Please see following formatter for implementation details:

/system/modules/org.opencms.dev.demo/elements/article/no_script/center.jsp

 

 

]]>
]]>