Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8498807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:30:12+00:00 2026-06-11T00:30:12+00:00

I managed to get a new ribbon group by following the article mentioned in

  • 0

I managed to get a new ribbon group by following the article mentioned in How to create the custom buttons horizontally one below the other in ribbon of Tridion

I’m now trying to get a Javascript running whenever something changes in the Gui (hiding/showing buttons).

I have this in the configuration:

<!-- In the cfg:groups part -->
<cfg:group name="ClientGuiMods.ContentGroup" description="">
    <cfg:fileset>
        <cfg:file type="script">/Scripts/CreateRibbonGroup.js</cfg:file>
    </cfg:fileset>
    <cfg:dependencies>
        <cfg:dependency>Tridion.Web.UI.Editors.CME</cfg:dependency>
    </cfg:dependencies>
</cfg:group>

<!-- In the ribbontoolbars add part -->
<ext:extension pageid="HomePage" name="Content" assignid="ContentGroupId">
    <ext:group>~/Scripts/ContentGroup.ascx</ext:group>
    <ext:dependencies>
        <cfg:dependency>ClientGuiMods.ContentGroup</cfg:dependency>
    </ext:dependencies>
    <ext:apply>
        <ext:view name="DashboardView">
            <ext:control id="DashboardToolbar" />
        </ext:view>
    </ext:apply>
</ext:extension>

And this in the Javascript:

Type.registerNamespace("ClientGuiMods");

ClientGuiMods.ContentGroup = function ContentGroup(element)
{
    console.log('RibbonGroupCreated');
    Tridion.OO.enableInterface(this, "ClientGuiMods.ContentGroup");
    this.addInterface("Tridion.Controls.RibbonItemsGroup", [element]);
};

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:30:14+00:00Added an answer on June 11, 2026 at 12:30 am

    @Bart, I tried the solution, but couln’t get that to work.

    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).

    I did however find a way to get to the ‘HomePage’ RibbonPage and get it to fire events from there.

    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.

    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 && !Tridion.Utils.Dom.isIE)
        $evt.addEventHandler(window, "DOMContentLoaded", ClientScripts.registerHomepage);
    else
        $evt.addEventHandler(window, "readystatechange", ClientScripts.registerHomepage);
    
    Tridion.Controls.Deck.registerPageType(ClientGuiMods.CreateRibbonPage, "HomePage");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am new to WCF and I have managed to get a custom
I eventually managed to get my other post sorted; to create a way to
I am new to Cocoa, but managed to get a connection (to a FTP)
I managed to get authentication to work by following the tutorial from this page
I managed to get custom themes running for Tabs but still got a lil
So I managed to get a page with Ajax ui.tab and in one of
I'm new to jQuery but I managed to get something working. The only thing
On my new Ubuntu system, I've managed to get Apache2 up and running for
I'm very new to android, in fact only started yesterday. I managed to get
I managed to get a QPushButton to open a new window when pressed by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.