London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Episerver - the checkbox for show in navigation unchecked by default

Vote:
 

In Episerver 7.19 I need to have the checkbox for show in navigation unchecked by default

#122939
Jun 18, 2015 12:48
Vote:
 

Hi,

You could set default value of "Display in navigation" for specific page type in Admin mode

Go to:  Admin mode->Content Type->[Page type from list]->Default values    and unclick two checkboxes:

Use adjusted default settings for pages using this page type

Display in navigation

#122947
Jun 18, 2015 14:29
Vote:
 

You can also override the SetDefaultValues method in your ContentType class.

public override void SetDefaultValues(EPiServer.DataAbstraction.ContentType contentType)
{
    base.SetDefaultValues(contentType);
    this.VisibleInMenu = false;
}
#122949
Jun 18, 2015 14:40
Vote:
 

Thanks for your answers, both solutions worked as expected. 

#122952
Jun 18, 2015 15:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.