Show subsite on top navigation

Showing subsite programmatically is not as straight forward as using the UI

Global navigation

I found out that this property is only available from PublishingWeb (instead of SPWeb object) which is contained in Microsoft.Sharepoint.Publishing.dll. By default VS 2010 does not include the dll in the reference. After adding the dll, use the code below to show sub sites

PublishingWeb publisher = PublishingWeb.GetPublishingWeb(myWeb);
publisher.Navigation.GlobalIncludeSubSites = true;


Hope that helps

Exception from HRESULT: 0x8107026E0

I got that exeception when I tried to deploy my solution. The problem was because I renamed my web template but I didn’t change the name attribute of the web template itself.

Hope that can help 🙂

Sharepoint list type id

Something that I always forget. You can also find it in

100 Generic list

101 Document library

102 Survey

103 Links list

104 Announcements list

105 Contacts list

106 Events list

107 Tasks list

108 Discussion board

109 Picture library

110 Data sources

111 Site template gallery

112 User Information list

113 Web Part gallery

114 List template gallery

115 XML Form library

116 Master pages gallery

117 No-Code Workflows

118 Custom Workflow Process

119 Wiki Page library

120 Custom grid for a list

130 Data Connection library

140 Workflow History

150 Gantt Tasks list

200 Meeting Series list

201 Meeting Agenda list

202 Meeting Attendees list

204 Meeting Decisions list

207 Meeting Objectives list

210 Meeting text box

211 Meeting Things To Bring list

212 Meeting Workspace Pages list

301 Blog Posts list

302 Blog Comments list

303 Blog Categories list

1100 Issue tracking

1200 Administrator tasks list