Developer forum

Forum » Development » Publish/unpublish from C#

Publish/unpublish from C#

Michael Houmark
Reply

Hi,

 

How can i publish/unpublish a page from C#. I tried:

var page = (DW Page object)

page.active = true;

page.save(); // page.save(true);

 

without any luck.
I havent been able to find any methods that actually has anything to do with publishing. 

Thanks in advance


Replies

 
Nicolai Høeg Pedersen
Reply

You also need to set Page.Hidden = False

If that is not enough, also call Dynamicweb.Frontend.Reset.ResetHash(Dynamicweb.Frontend.Reset.HashType.Page)

 

You must be logged in to post in the forum