Try our conversational search powered by Generative AI!

Copy published node to unpublished


When I copy a published node (containing many subnodes) and paste it into another node It will automatically become published, why? I need to change this behaviour, Pasted nodes should be unpublished by default.
There must be an easy way to fix this, since there are no easy way to unpublish a node including subnodes. 

We have a mainnode containing 40-50 subnodes that will be copied and pasted 4 times every year.

Oct 19, 2010 16:30

No answer, I solved it at the moment by overriding the pageprovider. But I dont want to solve it this way. The problem is that the PageProvider requires EpiServer Enterprise. There must be another way to solve this?


  public class OverridedLocalPageProvider : LocalPageProvider
        public override EPiServer.Core.PageReference Copy(EPiServer.Core.PageReference pageLink, EPiServer.Core.PageReference destinationLink, bool publishOnDestination, bool allowThreading)
            return base.Copy(pageLink, destinationLink, false, true);



And then added the following to episerver.config
      <add name="default"
           type="Saab.EpiServer.OverridedLocalPageProvider, Saab.EpiServer"
           capabilities="Create,Edit,Delete,Move,Copy,MultiLanguage,Security,Search,PageFolder" />



Oct 20, 2010 10:56

If it's only done 4 times a year I would probably do a Action Window plugin where you choose source and destination and then execute the code above. Seems a bit drastic to "create" your own pageprovider for that purpose.

Another approach could be to attach an event to publishing-page, not sure how to check if you're copying a page, but I guess you can somehow.


Oct 20, 2010 13:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.