Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>@Bart, I tried the solution, but couln't get that to work. </p> <p>Digging a bit further in the Javascripts in chrome I found there is no hook to fire any extra Javascript as a RibbonGroup (correct me if I'm wrong).</p> <p>I did however find a way to get to the 'HomePage' RibbonPage and get it to fire events from there. </p> <p>The extra thing I need is a "c:pagetype='Homepage'" on the RibbonPage named HomePage in the DOM, which isn't there by default. This can be set by including a load event script at the end. So now my script looks like this.</p> <pre><code>Type.registerNamespace("ClientGuiMods"); ClientGuiMods.CreateRibbonPage = function CreateRibbonPage(element) { Tridion.OO.enableInterface(this, "ClientGuiMods.CreateRibbonPage"); this.addInterface("Tridion.Controls.RibbonPage", [element]); }; ClientGuiMods.CreateRibbonPage.prototype.updateState = function CreateRibbonPage$updateState(stateObject) { //... //Ribbonpage logic to update the state of your buttons and groups }; console.log('Homepage: ' + document.getElementById('HomePage')); //.setAttribute('c:pagetype', 'HomePage'); var ClientScripts = { registerHomepage: function() { console.log('adding c:pagetype att'); var homepage = document.getElementById('HomePage'); if (homepage) { homepage.setAttribute('c:pagetype', 'HomePage'); } } } if (document.addEventListener &amp;&amp; !Tridion.Utils.Dom.isIE) $evt.addEventHandler(window, "DOMContentLoaded", ClientScripts.registerHomepage); else $evt.addEventHandler(window, "readystatechange", ClientScripts.registerHomepage); Tridion.Controls.Deck.registerPageType(ClientGuiMods.CreateRibbonPage, "HomePage"); </code></pre>
 

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