If you have custom web template based on OTB publishing site (CMSPUBLISHING) you can configure navigation settings declaratively by adding NavigationProperties feature (id = 541F5F57-C847-4e16-B59A-B31E90E6F9EA) to your onet.xml and defining properties, e.g.:
What other properties are supported? In order to answer on this question let’s check NavigationFeatureHandler feature receiver (from Microsoft.SharePoint.Publishing assembly). In its FeatureActivated method it uses private method ApplyNavigationProperties which does actual job:
So here we can see all supported properties:
|Supported navigation properties|
You can use these properties in your onet.xml files.