<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Trebuchet MS","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">Hello all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">How can we add a new button on ADE menu on a containerpage ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">We managed to customize a context menu through the config file opencms-modules.xml :<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3F7F7F">explorertype</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">
<span style="color:#7F007F">name</span><span style="color:black">=</span><i><span style="color:#2A00FF">"containerpage"</span></i>
<span style="color:#7F007F">key</span><span style="color:black">=</span><i><span style="color:#2A00FF">"fileicon.containerpage"</span></i>
<span style="color:#7F007F">icon</span><span style="color:black">=</span><i><span style="color:#2A00FF">"containerpage.png"</span></i>
<span style="color:#7F007F">bigicon</span><span style="color:black">=</span><i><span style="color:#2A00FF">"containerpage_big.png"</span></i>
<span style="color:#7F007F">reference</span><span style="color:black">=</span><i><span style="color:#2A00FF">"xmlcontent"</span></i><span style="color:teal">></span>
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> </span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3F7F7F">editoptions</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> </span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3F7F7F">contextmenu</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal"> <</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3F7F7F">entry</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">
<span style="color:#7F007F">key</span><span style="color:black">=</span><i><span style="color:#2A00FF">"GUI_EXPLORER_CONTEXT_CUSTOM_0"</span></i>
<span style="color:#7F007F">uri</span><span style="color:black">=</span><i><span style="color:#2A00FF">"/system/modules/com.eurelis.opencms.custom/elements/custom.jsp"</span></i>
<span style="color:#7F007F">rule</span><span style="color:black">=</span><i><span style="color:#2A00FF">"standard"</span></i><span style="color:teal">/></span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">We saw that in that same file, we have the ADE buttons:</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3F7F7F">entry</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">
<span style="color:#7F007F">key</span><span style="color:black">=</span><i><span style="color:#2A00FF">"GUI_EXPLORER_CONTEXT_SEO_0"</span></i>
<span style="color:#7F007F">name</span><span style="color:black">=</span><i><span style="color:#2A00FF">"org.opencms.gwt.client.ui.contextmenu.CmsOpenSeoDialog"</span></i>
<span style="color:#7F007F">rule</span><span style="color:black">=</span><i><span style="color:#2A00FF">"containerpage"</span></i><span style="color:teal">/></span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">But those classes (</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">org.opencms.gwt.client.*</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">)
seem NOT to be compiled on the OpenCms webapp (neither .class, nor .jar, nor java code in .jsp) and when trying to add a custom entry, the custom code does not seem to be executed at all.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">So can you help me on customizing the ADE buttons ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">What is the best practice for that ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">Thanks in advance.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">--<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif"">Antoine</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</body>
</html>