Developer forum

Forum » Development » Ribbonbar Addin on ParagraphList not working

Ribbonbar Addin on ParagraphList not working

Jonas Mersholm
Reply

Hi there.

I'm trying to add a Ribbonbar Addin to the ParagraphList. The Add-in tab is successfully added to the Ribbonbar, but when clicking it, it does not change the "display:none;" block to "display:block;", and therefor my actual Addin button are never shown.

Is this a known thing? Is there any workaround?

 

I'm simply using the default AddIn handler from the codeit.

        public override void Load()
        {
            // The code below is just a sample implementation that shows how to access the paragraphs associated with this RibbonBarAddIn.
            // To learn more about RibbonBarAddIns, check out: http://developer.dynamicweb-cms.com/documentation/for-developers/cms-extensibility/ribbon-bar.aspx

            RibbonBarGroup group = base.CreateDefaultContainer();
            RibbonBarButton button = new RibbonBarButton();
            group.Name = "Http Handler";
        
            group.AddItem(button);

            // Access the DataContext which is a ParagraphCollection for this AddIn.
            ParagraphCollection paragraphs = base.Ribbon.DataContext.DataSource as ParagraphCollection;

            button.Text = "Publiseret";
            button.Image = Dynamicweb.Controls.Icons.Icon.Type.CheckDocument;
            // Alternatively, specify your own Image path:
            // button.ImagePath = "/Admin/SomeImage.png";

            button.Size = Dynamicweb.Controls.Icons.Icon.Size.Large;
            button.EnableServerClick = true;
            button.Click += button_Click;
            group.Active = true;
          
        }

 

Best regards

Jonas


Replies

 
Nicolai Høeg Pedersen
Reply

Could you please post all of the code for the add-in?

 
Jonas Mersholm
Reply

Sure. As said earlier it's the default from the DyanmicWeb Codekit

 

Heres a 26 seconds video, displaying the problem/bug: http://screencast.com/t/WimWAgCft7Z

 

    [AddInTarget(RibbonBarAddInTarget.General.ParagraphList)]
    public class SetAsActiveAddin : RibbonBarAddIn
    {

        private string FilePosition = "/Files/UCNToolKit_HttpHandler.txt";

        /// <summary>
        /// Initializes a new instance of the ParagraphListAddIn1 class.
        /// </summary>
        public SetAsActiveAddin(RibbonBar ribbon)
            : base(ribbon)
        {

        }

        public override void Load()
        {
            // The code below is just a sample implementation that shows how to access the paragraphs associated with this RibbonBarAddIn.
            // To learn more about RibbonBarAddIns, check out: http://developer.dynamicweb-cms.com/documentation/for-developers/cms-extensibility/ribbon-bar.aspx

            RibbonBarGroup group = base.CreateDefaultContainer();
            RibbonBarButton button = new RibbonBarButton();
            group.Name = "Http Handler";
        
            group.AddItem(button);

            // Access the DataContext which is a ParagraphCollection for this AddIn.
            ParagraphCollection paragraphs = base.Ribbon.DataContext.DataSource as ParagraphCollection;

            button.Text = "Publiseret";
            button.Image = Dynamicweb.Controls.Icons.Icon.Type.CheckDocument;
            // Alternatively, specify your own Image path:
            // button.ImagePath = "/Admin/SomeImage.png";

            button.Size = Dynamicweb.Controls.Icons.Icon.Size.Large;
            button.EnableServerClick = true;
            button.Click += button_Click;
            group.Active = true;
          
        }

        void button_Click(object sender, EventArgs e)
        {
           // Handle click here           

        }

    }
 
Jonas Mersholm
Reply

Bump

 
Jonas Mersholm
Reply

Bump again.

 
Nicolai Høeg Pedersen
Reply

Hi Jonas

I've asked a dev to take a look at this.

Nicolai

 
Vladimir
Reply
This post has been marked as an answer

Hi Jonas,

Found a bug here: Addins tab does not displayed without OMC tab
Will fix this asap (16639). Sorry for the inconvenience.

 

Best regards,

Vladimir

Votes for this answer: 1
 
Kristian Kirkholt
Reply

Hi Jonas

The problem TFS#16639 "Addins tab does not show without OMC tab"  has now been fixed in version 8.5.1.17 and 8.6.0.2

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum