Change the Subsites and Pages navigation setting by codeFebruary 27, 2008 11:12It took me quite some time to figure out how to change the Subsites and Pages settings by code. I finally manged to change them. The setting “Show subsites” can be altered in 2 ways. I was only able to change the “Show pages” on a publishing site.
Method 1 (”Show subsites” only)
SPWeb web = new SPSite(webCollection).OpenWeb();
web.AllProperties["__IncludeSubSitesInNavigation"] = “False”; web.Update(); web.Close(); web.Dispose(); Method 2
SPWeb web = new SPSite(webCollection).OpenWeb();
Tags: code, IncludePagesInNavigation, IncludeSubSitesInNavigation, pages, publishing, site, subsites, __IncludeSubSitesInNavigation.
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web); publishingWeb.IncludePagesInNavigation = false; publishingWeb.IncludeSubSitesInNavigation = false; publishingWeb.Update(); publishingWeb.Close(); web.Close(); web.Dispose(); BizTalk 2006 Recipes - A problem-solution approachJanuary 13, 2007 19:26I would like to mention that there is a great book available about BizTalk 2006. It is called BizTalk 2006 Recipes, published by Apress and written by Mark Beckner, Ben Goeltz, Brandon Gross, Brennan O`Reilly, Stephen Roger, Mark Smith and Alexander West. (ISBN 1-59059-711-7)
In the book you will find a comprehensive guidance on working through complex deployment challenges, including tested, reusable code snippets for use in production, enabling faster deployment and minimal post-implementation engineering support. The book is intended for starting BizTalkers as well as the seasoned BizTalk professional, but in my opinion it might be useful to have already a little introduction to the BizTalk development environment before starting with this book. I already did a quick read in the book during my BizTalk 70-235 study, the book gives a detailed step by step overview of solutions (with lots of images) on how to work with BizTalk. The authors really did a good job to provide you with solutions that work, but best of all that works well. In the next month(s) I will read this book and try to run all the provided solutions. Of course I will post feedback about this book on this blog. Tags: apress, BizTalk, blog, book, code, deployment, guidance, oreilly, recipes, snippets. |
||