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 7409885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:08:59+00:00 2026-05-29T06:08:59+00:00

I would like to provide another button beside Save & Close button on site

  • 0

I would like to provide another button beside “Save & Close” button on site Page Editor that will trigger save and publish action once pressed.
I went to core and made a copy of “Save & Close” button that I’m planning to modify.

enter image description here

I would call this button “Save & Publish”, but now I’m kinda curious if I have to modify javascript to include my custom call (let’s say javascript:scSave("myPublish:saveAndPublish"))

I’m following this article to hook into pipeline and complete the action but not sure if that is proper way.

Any advice?

  • 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-05-29T06:08:59+00:00Added an answer on May 29, 2026 at 6:08 am

    What you need to do is define a custom command in App_Config/Commands.config:

    <command name="myPublish:saveAndPublish" 
    type="YourNamespace.YourCommand, YourAssembly" />
    

    Any custom command needs to subclass Sitecore.Shell.Framework.Commands.Command and override the method public override void Execute(CommandContext context).

    Use your custom command to call the PublishItem command:

    public override void Execute(CommandContext context)
    {
        var publishCommand = new PublishItem();
        publishCommand.Execute(context);
    }
    

    A few things to look for:

    • This has worked for me in Firefox, but not Chrome, where the item is not saved. scSave uses a lot of front-end javascript, so this appears to be a bug with Sitecore’s Chrome support.
    • Strangely, the syntax scSave("item:publish") does not work, but calling PublishComand indirectly from a custom command does work. If anyone figures out why this is, please comment!
    • scSave only works when called from a WebEditButton (/sitecore/templates/System/WebEdit/WebEdit Button), not a ribbon button (‘/sitecore/templates/System/Ribbon/Large Button’) or (‘/sitecore/templates/System/Ribbon/Small Button’).
    • The WebEditButton must be located at the top of the ribbon hierarchy (‘/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Buttons’). If it is placed on one of the chunks (e.g. “New”, “Edit”, etc.) it will not render.
    • When creating a WebEditButton, if you want to control the icon that displays on the Page Editor, you need to set the Data/Icon through Raw Values. Otherwise, the value gets saved to Appearance/Icon, which controls the icon for the content item, not the PageEditor button. This is due to a bug with the Content Editor.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to provide a PHP hanging request that will stay open until
I would like to write a utility that will provide me with a relatively
I would like to provide two different versions of my iPhone app on the
I would like to provide the raw text referring to an environment variable to
I would like to provide the same content inside 2 different base files. So,
I have developed about 300 Applications which I would like to provide with multi-language
I'm building a plugin assembly and I would like to provide an accompanying config
I am writing and publishing my apps on android and would like to provide
I would like to know how to provide a Ruby application with a REST
I would like to update a Windows Forms application to provide the following features:

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.