Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Set SSL Settings to Never by default View modes: 
User avatar
Member
Member
Guenter - 1/31/2014 5:29:39 AM
   
Set SSL Settings to Never by default
Hi,

Is there an easy way to set the default setting of SSL to "Never" by default when a new document is created?

TIA

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/31/2014 7:45:04 PM
   
RE:Set SSL Settings to Never by default
Hello,

For this purpose you can create a custom Global event which will be using DocumentEvents.Insert.After (see an example in the Dev Guide) and here you can simply set this property for every document immediately after it is created.

There is a field/column for this purpose in CMS_Tree table in database: RequiresSSL.

You can set these field using the standard approach with node.SetValue() method:
API Examples - Creating documents

Options for Requires SSL:
Yes => RequiresSSL = 1
No => RequiresSSL = 0
Inherits => RequiresSSL = NULL
Never => RequiresSSL = 2

Best Regards,
Martin Danko