Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript on ribbon group
    text
    copied!<p>I managed to get a new ribbon group by following the article mentioned in <a href="https://stackoverflow.com/questions/11682702/how-to-create-the-custom-buttons-horizontally-one-below-the-other-in-ribbon-of-t">How to create the custom buttons horizontally one below the other in ribbon of Tridion</a></p> <p>I'm now trying to get a Javascript running whenever something changes in the Gui (hiding/showing buttons). </p> <p>I have this in the configuration:</p> <pre class="lang-xml prettyprint-override"><code>&lt;!-- In the cfg:groups part --&gt; &lt;cfg:group name="ClientGuiMods.ContentGroup" description=""&gt; &lt;cfg:fileset&gt; &lt;cfg:file type="script"&gt;/Scripts/CreateRibbonGroup.js&lt;/cfg:file&gt; &lt;/cfg:fileset&gt; &lt;cfg:dependencies&gt; &lt;cfg:dependency&gt;Tridion.Web.UI.Editors.CME&lt;/cfg:dependency&gt; &lt;/cfg:dependencies&gt; &lt;/cfg:group&gt; &lt;!-- In the ribbontoolbars add part --&gt; &lt;ext:extension pageid="HomePage" name="Content" assignid="ContentGroupId"&gt; &lt;ext:group&gt;~/Scripts/ContentGroup.ascx&lt;/ext:group&gt; &lt;ext:dependencies&gt; &lt;cfg:dependency&gt;ClientGuiMods.ContentGroup&lt;/cfg:dependency&gt; &lt;/ext:dependencies&gt; &lt;ext:apply&gt; &lt;ext:view name="DashboardView"&gt; &lt;ext:control id="DashboardToolbar" /&gt; &lt;/ext:view&gt; &lt;/ext:apply&gt; &lt;/ext:extension&gt; </code></pre> <p>And this in the Javascript:</p> <pre class="lang-js prettyprint-override"><code>Type.registerNamespace("ClientGuiMods"); ClientGuiMods.ContentGroup = function ContentGroup(element) { console.log('RibbonGroupCreated'); Tridion.OO.enableInterface(this, "ClientGuiMods.ContentGroup"); this.addInterface("Tridion.Controls.RibbonItemsGroup", [element]); }; </code></pre> <p>I've tried different arguments for this.addInterface(), but it never gets called. Is this the correct way? Or is there maybe another way to get a script called on the Home ribbon toolbar?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload