KalikoCMS / KalikoCMS.Core

Open source content management system (CMS) for the ASP.NET platform.
GNU Lesser General Public License v3.0
145 stars 64 forks source link

SetDefaults should work with visibility flags as well as properties #140

Closed fschultz closed 5 years ago

fschultz commented 6 years ago

The following code sample works for setting the property Headline, but editor fields for "visible in menu" and "visible in sitemap" aren't updated accordingly:

        public override void SetDefaults(EditablePage editablePage) {
            editablePage.SetVisibleInSiteMap(true);
            editablePage.SetVisibleInMenu(true);
            editablePage.SetProperty("Headline", new StringProperty("Test"));
        }

SetDefaults should be able to handle all values that could be set.