<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.sharepointblogs.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Todd Baginski&amp;#39;s SharePoint 2003 and MOSS 2007 Blog</title><link>http://www.sharepointblogs.com/tbaginski/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>A great loss...</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/09/05/a-great-loss.aspx</link><pubDate>Fri, 05 Sep 2008 16:32:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:20598</guid><dc:creator>tbaginski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=20598</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/09/05/a-great-loss.aspx#comments</comments><description>&lt;p&gt;It saddens me greatly to know &lt;a class="" href="http://www.u2u.info/Blogs/Patrick/default.aspx"&gt;Pat Tisseghem&lt;/a&gt; &lt;a class="" href="http://weblogs.asp.net/jan/archive/2008/09/05/patrick-tisseghem-passed-away.aspx"&gt;passed away yesterday&lt;/a&gt;.&amp;nbsp; Every single time I met Pat at a conference or had dinner and drinks with him he was&amp;nbsp;energetic, smiling, and a fun guy to be around; and that is how I will always remember him.&lt;/p&gt;
&lt;p&gt;My heart goes out to his close family and friends and I wish you all the best!&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=20598" width="1" height="1"&gt;</description></item><item><title>Speaking at the SharePoint Web 2.0 FireStarter next week</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/06/07/speaking-at-the-sharepoint-web-2-0-firestarter-next-week.aspx</link><pubDate>Sat, 07 Jun 2008 18:04:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:17364</guid><dc:creator>tbaginski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=17364</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/06/07/speaking-at-the-sharepoint-web-2-0-firestarter-next-week.aspx#comments</comments><description>&lt;p&gt;If you missed my Creating Solutions With The Business Data Catalog session at TechEd last week, and you&amp;#39;d like to see the SilverLight / BDC integration demo I did there, come attend the &lt;a href="http://www.microsoft.com/events/EventDetails.aspx?CMTYSvcSource=MSCOMMedia&amp;amp;Params=~CMTYDataSvcParams%5E~arg+Name%3D%22ID%22+Value%3D%221032379380%22%2F%5E~arg+Name%3D%22ProviderID%22+Value%3D%22A6B43178-497C-4225-BA42-DF595171F04C%22%2F%5E~arg+Name%3D%22lang%22+Value%3D%22en%22%2F%5E~arg+Name%3D%22Country%22+Value%3D%22United%20States%22%2F%5E~sParams%5E~%2FsParams%5E~%2FCMTYDataSvcParams%5E" target="_blank"&gt;SharePoint Web 2.0 FireStarter&lt;/a&gt; event next week on the Microsoft campus.&amp;nbsp; Heck, come attend anyway, there are many great topics and presentations scheduled.&amp;nbsp; I&amp;#39;ll be presenting my demo at the tail end of Steve Fox&amp;#39;s SilverLight on SharePoint session.&amp;nbsp; You can see the complete schedule and register &lt;a href="http://www.microsoft.com/events/EventDetails.aspx?CMTYSvcSource=MSCOMMedia&amp;amp;Params=~CMTYDataSvcParams%5E~arg+Name%3D%22ID%22+Value%3D%221032379380%22%2F%5E~arg+Name%3D%22ProviderID%22+Value%3D%22A6B43178-497C-4225-BA42-DF595171F04C%22%2F%5E~arg+Name%3D%22lang%22+Value%3D%22en%22%2F%5E~arg+Name%3D%22Country%22+Value%3D%22United%20States%22%2F%5E~sParams%5E~%2FsParams%5E~%2FCMTYDataSvcParams%5E" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=17364" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/BDC/default.aspx">BDC</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Conferences/default.aspx">Conferences</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SilverLight/default.aspx">SilverLight</category></item><item><title>TechEd North America 2008 Session Materials : Creating Solutions with the Business Data Catalog</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/06/07/teched-north-america-2008-session-materials-creating-solutions-with-the-business-data-catalog.aspx</link><pubDate>Sat, 07 Jun 2008 17:57:23 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:17363</guid><dc:creator>tbaginski</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=17363</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/06/07/teched-north-america-2008-session-materials-creating-solutions-with-the-business-data-catalog.aspx#comments</comments><description>&lt;p&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;font color="#004080"&gt;&lt;strong&gt;Thanks&lt;/strong&gt; to everyone who came to my session last week at the Microsoft TechEd 2008 North America Developer conference!&amp;nbsp; It was really nice to see so many past students at the show and I enjoyed catching up with everyone.&amp;nbsp; On Wednesday night I had the chance to hang out with many of the Microsoft MVPs and watch the Blues Brothers kick it at the House of Blues.&amp;nbsp; &lt;a href="http://www.binarywave.com/blogs/eshupps/default.aspx" target="_blank"&gt;Eric Shupps&lt;/a&gt; accompanied the Blues Brothers for a song, I wish I had a picture of it, I thought he did pretty well.&amp;nbsp; :)&amp;nbsp; I met &lt;a href="http://www.brettlonsdale.com/default.aspx" target="_blank"&gt;Brett Lonsdale&lt;/a&gt; for the first time, &lt;a href="http://sharepointnick.com/blog/default.aspx" target="_blank"&gt;Nick Swan&amp;#39;s&lt;/a&gt; partner at BDC Meta Man, and we shared some great laughs with &lt;a href="http://www.thorprojects.com/blog/default.aspx" target="_blank"&gt;Rob Bogue&lt;/a&gt;.&amp;nbsp; &lt;a href="http://www.andrewconnell.com/index.aspx" target="_blank"&gt;AC&lt;/a&gt; was absolutely mobbed during his book signings; it was really cool to see a person as talented and hard working as Andrew enjoying the spotlight.&amp;nbsp; Thanks for the book AC!&amp;nbsp; &lt;a href="http://www.blackbladeinc.com/en-us/aboutus/Pages/BradleyThomasSmith.aspx" target="_blank"&gt;Brad Smith&lt;/a&gt; gave us a demo of his new Black Black appliance and we were all impressed.&amp;nbsp; I only saw &lt;a href="http://www.wildwires.com/Blog/" target="_blank"&gt;Stacy Draper&lt;/a&gt;, &lt;a href="http://www.shillier.com/" target="_blank"&gt;Scott Hillier&lt;/a&gt; and &lt;a href="http://www.bobmixon.com/Pages/default.aspx" target="_blank"&gt;Bob Mixon&lt;/a&gt; for a short time, and it&amp;#39;s always good to their smiling faces.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Calibri" color="#004080" size="3"&gt;You can find the Site Template Package (STP) for the SharePoint site I used for my demos &lt;/font&gt;&lt;font face="Calibri" color="#004080" size="3"&gt;&lt;a href="http://www.sharepointblogs.com/files/folders/tbaginski/entry17362.aspx" target="_blank"&gt;here&lt;/a&gt;&lt;/font&gt;&lt;font face="Calibri" color="#004080" size="3"&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Calibri" color="#004080" size="3"&gt;The SilverLight and BDC Integration demo will be available soon right here on my blog, so please keep an eye out for it.&lt;/font&gt;&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=17363" width="1" height="1"&gt;</description></item><item><title>Moving On</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/05/18/moving-on.aspx</link><pubDate>Mon, 19 May 2008 00:37:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:16612</guid><dc:creator>tbaginski</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=16612</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/05/18/moving-on.aspx#comments</comments><description>&lt;p&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;As of May 18, I am no longer with &lt;a class="" href="http://www.sharepointexperts.com/"&gt;SharePoint Experts, Inc.&lt;/a&gt;&amp;nbsp; Over four years ago, I first met &lt;a class="" href="http://www.sharepointblogs.com/dustin/default.aspx"&gt;Dustin Miller&lt;/a&gt;, the president of SharePoint Experts.&amp;nbsp; Back then, I was attending his &lt;a class="" href="http://sharepointbootcamp.com/sharepoint_bootcamp.htm"&gt;“Original” SharePoint Bootcamp&lt;/a&gt;, and SPS 2003 was still in the beta stages.&amp;nbsp; Shortly after that, I joined the team, and since then, with Dustin’s support and the support of all my friends at SharePoint Experts, I wrote the first SharePoint development training class in the industry (the &lt;a class="" href="http://sharepointbootcamp.com/sharepoint_development_bootcamp.htm"&gt;SharePoint Development Bootcamp&lt;/a&gt;), became a SharePoint MVP, and started a new role as a regular conference speaker.&amp;nbsp; As time went on, my role within the company grew even more!&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Throughout these exciting years, I was privileged to create strong friendships with Dustin, &lt;a class="" href="http://www.sharepointblogs.com/matt/default.aspx"&gt;Matt Passannante&lt;/a&gt;, &lt;a class="" href="http://www.heathersolomon.com/"&gt;Heather Solomon&lt;/a&gt;, &lt;a class="" href="http://www.sharepointblogs.com/dortiz/default.aspx"&gt;Doug Ortiz&lt;/a&gt; and all the other members of the SharePoint Experts family and contractor network.&amp;nbsp; &amp;nbsp;I’m very thankful for the opportunities, expertise and support they have provided me along the way, and I look forward to many more years of friendship with these great folks.&amp;nbsp; Don’t be surprised if you see us all together at conferences!&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Although I am leaving the company to pursue another opportunity, I’m moving into a new type of role, and I’ll continue to recommend SharePoint Experts for your SharePoint training needs!&amp;nbsp; In fact, I personally trained the instructor that will be teaching my class (Doug Ortiz), and he’s going to be writing new material for future deliveries of the course.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;I have nothing but the fondest of memories of my time with the SharePoint Experts crew.&amp;nbsp; They will be deeply missed, and I wish all of them the best in their future endeavors.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16612" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Creating Solutions with the MOSS Single Sign On Service Session Materials</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/03/06/creating-solutions-with-the-moss-single-sign-on-service-session-materials.aspx</link><pubDate>Thu, 06 Mar 2008 09:50:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:13658</guid><dc:creator>tbaginski</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=13658</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/03/06/creating-solutions-with-the-moss-single-sign-on-service-session-materials.aspx#comments</comments><description>&lt;p&gt;WOW!&amp;nbsp; What a day!&amp;nbsp; First, I got to meet Greg Lemond!&amp;nbsp; He is a very down to earth guy and I really enjoyed spending some time with him.&amp;nbsp; It was an experience I will certainly remember forever!&amp;nbsp; Then, believe it or not,&amp;nbsp;Master Chief himself showed up in our booth in the expo hall!&amp;nbsp; As soon as I get a copy of the pictures I&amp;#39;ll post them here. :)&amp;nbsp; As if those two things were not enough excitement for one day; then I presented my Creating Solutions with the MOSS Single Sign On Service session and finally the day wrapped up with a great dinner and some good times&amp;nbsp;at Kell&amp;#39;s Irish pub here in Seattle.&amp;nbsp; I&amp;#39;m very thankful for all the wonderful opportunities I&amp;#39;ve had this week and I&amp;#39;d like to send a special thank you out to all the folks who put on&amp;nbsp;the Microsoft SharePoint Conference that made it all possible!&lt;/p&gt;
&lt;p&gt;Thanks to everyone who came to my session today!&amp;nbsp; I really enjoyed presenting my session to such an enthusiastic crowd.&amp;nbsp; As promised, &lt;a class="" href="http://www.sharepointblogs.com/files/folders/tbaginski/entry13221.aspx" target="_blank"&gt;here you will find the materials&lt;/a&gt; that I presented in my session today.&amp;nbsp; Enjoy!&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t wait to get back home and jump on my bike again ...&amp;nbsp;it&amp;#39;s time to climb some mountains! :)&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=13658" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SSO/default.aspx">SSO</category></item><item><title>Creating Solutions with the Business Data Catalog (BDC) Session Materials</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/03/04/creating-solutions-with-the-business-data-catalog-bdc-session-materials.aspx</link><pubDate>Wed, 05 Mar 2008 01:52:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:13554</guid><dc:creator>tbaginski</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=13554</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/03/04/creating-solutions-with-the-business-data-catalog-bdc-session-materials.aspx#comments</comments><description>&lt;p&gt;What a fun week it has been so far at the&amp;nbsp;&lt;a href="http://www.mssharepointconference.com/Pages/Default.aspx"&gt;Microsoft SharePoint Conference&lt;/a&gt;!&amp;nbsp; I just finished presenting my Creating Solutions with the Business Data Catalog (BDC) session and I&amp;#39;m looking forward to presenting my Creating Solutions with the MOSS Single Sign On Service session tomorrow.&amp;nbsp; Thanks to everyone who came to my session today!&amp;nbsp; All the code and materials for today&amp;#39;s session are now &lt;a class="" href="http://www.sharepointblogs.com/files/folders/tbaginski/entry13223.aspx" target="_blank"&gt;available here&lt;/a&gt;.&amp;nbsp;Enjoy! &lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=13554" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/BDC/default.aspx">BDC</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Conferences/default.aspx">Conferences</category></item><item><title>Upcoming Microsoft SharePoint Conference!</title><link>http://www.sharepointblogs.com/tbaginski/archive/2008/02/25/upcoming-microsoft-sharepoint-conference.aspx</link><pubDate>Mon, 25 Feb 2008 15:06:46 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:13104</guid><dc:creator>tbaginski</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=13104</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2008/02/25/upcoming-microsoft-sharepoint-conference.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;m really looking forward to next week!&amp;nbsp; It will be great to meet all sorts of new people and see so many colleagues from across the globe at the &lt;a href="http://www.mssharepointconference.com/Pages/Default.aspx"&gt;Microsoft SharePoint Conference&lt;/a&gt;.&amp;nbsp; I will be presenting the following two sessions at the conference, I hope you have a chance to attend them!&amp;nbsp; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Creating Solutions with the Business Data Catalog (BDC)&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Creating Solutions with the MOSS Single Sign On Service&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;All the code and materials that are part of my sessions will be posted here, on my blog, after the sessions have been delivered. &lt;p&gt;If you would like to talk about these topics after the sessions, or other SharePoint development topics, please drop by and say hello at one of the sessions or come and chat with me in our booth in the expo hall.&amp;nbsp; You can also find me at the Ask the Experts sessions, or the Game Night on Wednesday. &lt;p&gt;On Tuesday night, Microsoft has rented out the Museum of Flight for the conference attendees.&amp;nbsp; If you have not been there before, I recommend checking it out.&amp;nbsp; The flight simulator is a really good time! &lt;p&gt;See you soon! 
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=13104" width="1" height="1"&gt;</description></item><item><title>HOW TO: Programmatically customize site navigation in WSS 3.0 and MOSS 2007</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/12/26/how-to-programmatically-customize-site-navigation-in-wss-3-0-and-moss-2007.aspx</link><pubDate>Wed, 26 Dec 2007 18:36:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:10270</guid><dc:creator>tbaginski</dc:creator><slash:comments>31</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=10270</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/12/26/how-to-programmatically-customize-site-navigation-in-wss-3-0-and-moss-2007.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is a repost of an article I posted while WSS 3.0 and MOSS 2007 were in the Beta stages.&amp;nbsp; The article was lost due to a server crash and many people have asked me to repost the article so I updated it with&amp;nbsp;additional information, updates screen shots, and a&amp;nbsp;&lt;a href="http://www.sharepointblogs.com/files/folders/tbaginski/entry10255.aspx"&gt;handy little Windows Forms Application&lt;/a&gt; you can use to test these concepts out yourself, or build upon the code base to meet your own needs.&amp;nbsp; Enjoy! 
&lt;p&gt;In the previous version of SharePoint the QuickLaunch menu was controlled via the ONET.XML file and ASPX pages that made up a Site Definition, and making changes to the QuickLaunch menu was a cumbersome task at best. 
&lt;p&gt;The new version of SharePoint provides significant improvements to the navigational elements within a SharePoint site as well as the ability to change these elements programmatically! This article describes how to programmatically interact with the navigation elements via the WSS API in order to customize SharePoint site navigation. This article also investigates the security trimming capabilities of the SharePoint UI with respect to programmatically edited navigation links. 
&lt;p&gt;The first thing to note is that the objects used to programmatically customize navigation reside in the Microsoft.SharePoint.Navigation namespace. So, you’ll need to add a reference to the Microsoft.SharePoint.dll in your Visual Studio projects. 
&lt;p&gt;&lt;b&gt;New item: Controlling navigation via the SPWeb object!&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The SPWeb object has been enhanced in MOSS 2007 to support the ability to control the navigation of a SharePoint site programmatically! Let’s examine how this can be done. 
&lt;p&gt;The SPWeb object has a new property named Navigation that returns a SPNavigation object. This object allows developers to programmatically control the navigation of a SharePoint site. 
&lt;p&gt;&lt;b&gt;Shared Navigation Settings&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;One of the new settings you may apply to a site’s navigation structure is whether or not the site uses the navigation menus from its parent site. 
&lt;p&gt;These examples assume you have created a top level site named test and a sub site named sharednav under the test top level site as well as a sub site named nosharednav under the test top level site. Once these sites have been created their hierarchy and URLs will look like this: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10256/download.aspx" alt="" /&gt; 
&lt;p&gt;Before we get started, to help set the stage, here is what the navigation looks like in the test site. 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10257/download.aspx" alt="" /&gt; 
&lt;p&gt;Here is an example of how to set a sub site to use the navigation from its parent site. 
&lt;p&gt;SPSite sharedNavSite = new SPSite(“http://server/test/sharednav”); 
&lt;p&gt;SPWeb sharedNavWeb = sharedNavSite.OpenWeb(); 
&lt;p&gt;sharedNavWeb.Navigation.UseShared = true; 
&lt;p&gt;The navigation for the sharednav site looks like this after the lines of code above have been run to set the property. Notice the breadcrumb trail at the top of the page uses the breadcrumb trail for the test top level site and the horizontal menu bar uses the items from the test top level site as well. 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10258/download.aspx" alt="" /&gt; 
&lt;p&gt;Here is an example of how to set a sub site &lt;b&gt;not&lt;/b&gt; to use the navigation from a parent’s site. 
&lt;p&gt;SPSite noSharedNavSite = new SPSite(“http://server/test/nosharednav”); 
&lt;p&gt;SPWeb noSharedNavWeb = noSharedNavSite.OpenWeb(); 
&lt;p&gt;noSharedNavWeb.Navigation.UseShared = false; 
&lt;p&gt;The navigation for the nosharednav site looks like this after the lines of code above have been run to set the property. Notice the breadcrumb trail at the top of the page uses the breadcrumb trail for the nosharednav sub site and the horizontal menu bar uses the items from the nosharednav sub site. 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10259/download.aspx" alt="" /&gt; 
&lt;p&gt;&lt;b&gt;QuickLaunch Menu Items&lt;/b&gt; 
&lt;p&gt;The QuickLaunch navigation menu may also be accessed programmatically. You can create new menu items in the QuickLaunch navigation menu and remove them. You can also specify if the link is external to the site. 
&lt;p&gt;Here is how you &lt;b&gt;add a&lt;/b&gt; &lt;b&gt;menu item to the QuickLaunch navigation menu&lt;/b&gt;. 
&lt;p&gt;These QuickLaunch examples assume you have created a top level site named quicklaunch. 
&lt;p&gt;Once this top level site has been created its URL will look like this: http://server/quicklaunch 
&lt;p&gt;In this example we will add two links to the QuickLaunch menu for the quicklaunch top level site, one link will be internal and one will be external. The internal link will point to the Links list in the QuickLaunch site. The external link will point to the SharePoint Experts web site. 
&lt;p&gt;SPSite quickLaunchSite = new SPSite(“http://server/quicklaunch”); 
&lt;p&gt;SPWeb quickLaunchWeb = quickLaunchSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection quickLaunchNodes = quickLaunchWeb.Navigation.QuickLaunch; 
&lt;p&gt;SPNavigationNode internalMenuItem = new SPNavigationNode(“Links”, “Lists/Links/AllItems.aspx”, false); 
&lt;p&gt;quickLaunchNodes.AddAsFirst(internalMenuItem); 
&lt;p&gt;SPNavigationNode externalMenuItem = new SPNavigationNode(“SharePoint Experts”, “http://www.SharePointExperts.com”, true); 
&lt;p&gt;quickLaunchNodes.AddAsFirst(externalMenuItem); 
&lt;p&gt;quickLaunchWeb.Update(); 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; If you do not call the Update() method on the SPWeb object you are working with, you will need to reset IIS to see your changes. 
&lt;p&gt;Here is what the quicklaunch Site Collection looks like after the above code has been executed: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10260/download.aspx" alt="" /&gt; 
&lt;p&gt;Here is how you &lt;b&gt;remove a&lt;/b&gt; &lt;b&gt;menu item from the QuickLaunch navigation menu&lt;/b&gt;. 
&lt;p&gt;In this example we will remove the external link to the SharePoint Experts web site. 
&lt;p&gt;SPSite quickLaunchSite = new SPSite(“http://server/quicklaunch”); 
&lt;p&gt;SPWeb quickLaunchWeb = quickLaunchSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection quickLaunchNodes = quickLaunchWeb.Navigation.QuickLaunch; 
&lt;p&gt;quickLaunchNodes.Delete(quickLaunchNodes([0])); 
&lt;p&gt;quickLaunchWeb.Update(); 
&lt;p&gt;Here is what the quicklaunch Site Collection looks like after the above code has been executed: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10261/download.aspx" alt="" /&gt; 
&lt;p&gt;&lt;b&gt;Taking the QuickLaunch menu one step further&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The QuickLaunch menu is capable of displaying links in a grouped fashion, as you see in the screenshot above. For example, the Lists menu item in the screenshot above has two items under it – the Calendar and Tasks links. Creating your own grouped links can be done programmatically. This is once again a simple process that requires very little code. 
&lt;p&gt;Here is how you &lt;b&gt;add grouped&lt;/b&gt; &lt;b&gt;menu items to the QuickLaunch navigation menu&lt;/b&gt;. 
&lt;p&gt;In this example we will create a header link for the group of links and name it Administration. Then we will add two links under the Administration header link. The links will link to the Create and Site Settings pages for the quicklaunch Site Collection. 
&lt;p&gt;SPSite quickLaunchSite = new SPSite(&amp;quot;http://&amp;quot; + serverTextBox.Text + &amp;quot;/quicklaunch&amp;quot;); 
&lt;p&gt;SPWeb quickLaunchWeb = quickLaunchSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection quickLaunchNodes = quickLaunchWeb.Navigation.QuickLaunch; 
&lt;p&gt;SPNavigationNode internalMenuItem = new SPNavigationNode(&amp;quot;Administration&amp;quot;, &amp;quot;&amp;quot;, false); 
&lt;p&gt;quickLaunchNodes.AddAsFirst(internalMenuItem); 
&lt;p&gt;SPNavigationNode externalSubMenuItem1 = new SPNavigationNode(&amp;quot;Site Settings&amp;quot;, quickLaunchWeb.Url + &amp;quot;/_layouts/settings.aspx&amp;quot;, true); 
&lt;p&gt;quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem1); 
&lt;p&gt;SPNavigationNode externalSubMenuItem2 = new SPNavigationNode(&amp;quot;Create&amp;quot;, quickLaunchWeb.Url + &amp;quot;/_layouts/create.aspx&amp;quot;, true); 
&lt;p&gt;quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem2); 
&lt;p&gt;quickLaunchWeb.Update(); 
&lt;p&gt;Here is what the quicklaunch Site Collection looks like after the above code has been executed: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10262/download.aspx" alt="" /&gt; 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; I added the Create and Site Settings links to the QuickLaunch bar to test the security trimmed aspects of the SharePoint UI. I wanted to see if SharePoint would hide these links from users who did not have access to see them because MOSS 2007 hides these links in the out of the box SharePoint UI from users who only have reader access. 
&lt;p&gt;I created a user named reader and granted the user read only access to the quicklaunch top level site. When I logged into the quicklaunch top level site with this user the links I just added to the QuickLaunch were available to the reader user! This is an important thing to note, and should be kept in mind when adding links to the QuickLaunch menu! 
&lt;p&gt;Here is what the quicklaunch Site Collection looked like when the reader user logged in: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10263/download.aspx" alt="" /&gt; 
&lt;p&gt;Here is the screen you see when you click one of the links you do not have access to: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10264/download.aspx" alt="" /&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;Top Navigation Menu Items&lt;/b&gt; 
&lt;p&gt;The top navigation menu may also be accessed programmatically. You can create new menu items in the top navigation menu navigation menu and remove them. You can also specify if the link is external to the site. 
&lt;p&gt;Here is how you &lt;b&gt;add a&lt;/b&gt; &lt;b&gt;menu item to the top navigation menu&lt;/b&gt;. 
&lt;p&gt;This example assumes you have created a top level site named topnavigation. 
&lt;p&gt;Once this Site Collection has been created its URLs will look like this: http://server/topnavigation 
&lt;p&gt;In this example we will add two links to the top navigation menu for the topnavigation top level site, one link will be internal and one will be external. The internal link will point to the Links list in the topnavigation site. The external link will point to the SharePoint Experts web site. 
&lt;p&gt;SPSite topNavigationSite = new SPSite(“http://server/topnavigation”); 
&lt;p&gt;SPWeb topNavigationWeb = topNavigationSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection topNavigationNodes = topNavigationWeb.Navigation.TopNavigationBar; 
&lt;p&gt;SPNavigationNode internalMenuItem = new SPNavigationNode(“Links”, “Lists/Links/AllItems.aspx”, false); 
&lt;p&gt;topNavigationNodes.AddAsFirst(internalMenuItem); 
&lt;p&gt;SPNavigationNode externalMenuItem = new SPNavigationNode(“SharePoint Experts”, “http://www.SharePointExperts.com”, true); 
&lt;p&gt;topNavigationNodes.AddAsFirst(externalMenuItem); 
&lt;p&gt;topNavigationWeb.Update(); 
&lt;p&gt;Here is what the topnavigation top level site looks like after the above code has been executed: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10265/download.aspx" alt="" /&gt; 
&lt;p&gt;Here is how you &lt;b&gt;delete a&lt;/b&gt; &lt;b&gt;menu item from the top navigation menu&lt;/b&gt;. In this example we will remove the Links link we just added to the top navigation menu for the topnavigation top level site. 
&lt;p&gt;SPSite topNavigationSite = new SPSite(“http://server/topnavigation”); 
&lt;p&gt;SPWeb topNavigationWeb = topNavigationSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection topNavigationNodes = topNavigationWeb.Navigation.TopNavigationBar; 
&lt;p&gt;topNavigationNodes.Delete(topNavigationNodes[0]); 
&lt;p&gt;topNavigationWeb.Update(); 
&lt;p&gt;Here is what the topnavigation top level site looks like after the above code has been executed: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10266/download.aspx" alt="" /&gt; 
&lt;p&gt;&lt;b&gt;Taking the Top Navigation one step further&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The top Navigation menu is capable of displaying dropdown menus that consist of multiple items. Adding additional sub menu items under the topmost item is a simple process and requires very little code. 
&lt;p&gt;Here is how you &lt;b&gt;add a sub menu item to a top level menu item in the top navigation menu&lt;/b&gt;. In this example we will add a new top level menu item to the top navigation menu that has two sub menu items under it for the topnavigation top level site. 
&lt;p&gt;SPSite topNavigationSite = new SPSite(“http://server/topnavigation”); 
&lt;p&gt;SPWeb topNavigationWeb = topNavigationSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection topNavigationBarNodes = 
&lt;p&gt;topNavigationWeb.Navigation.TopNavigationBar; 
&lt;p&gt;SPNavigationNode headerMenuItem = new SPNavigationNode(&amp;quot;SharePoint Sites&amp;quot;, &amp;quot;&amp;quot;, false); 
&lt;p&gt;topNavigationBarNodes.AddAsFirst(headerMenuItem); 
&lt;p&gt;SPNavigationNode externalSubMenuItem1 = new SPNavigationNode(&amp;quot;SharePoint Experts&amp;quot;, &amp;quot;http://www.SharePointExperts.com&amp;quot;, true); 
&lt;p&gt;topNavigationBarNodes[0].Children.AddAsFirst(externalSubMenuItem1); 
&lt;p&gt;SPNavigationNode externalSubMenuItem2 = new SPNavigationNode(&amp;quot;SharePoint University&amp;quot;, &amp;quot;http://www.SharePointU.com&amp;quot;, true); 
&lt;p&gt;topNavigationBarNodes[0].Children.AddAsFirst(externalSubMenuItem2); 
&lt;p&gt;topNavigationWeb.Update(); 
&lt;p&gt;Here is what the topnavigation top level site looks like after the above code has been executed: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10267/download.aspx" alt="" /&gt; 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; I was curious to see if the Top Navigation menu reacted the same way the QuickLaunch menu bar did regarding the security trimming of the UI. So I created an Administration Header link and two sub links for the Create and Site Settings pages. 
&lt;p&gt;I granted the reader user read only access to the topnavigation top level site and when I logged into the topnavigation top level site with this user the links I just added to the Top Navigation menu were available to the reader user! This is an important thing to note, and should be kept in mind when adding links to the Top Navigation menu! 
&lt;p&gt;Here is the code I used to add the links: 
&lt;p&gt;SPSite topNavigationSite = new SPSite(“http://server/topnavigation”); 
&lt;p&gt;SPWeb topNavigationWeb = topNavigationLaunchSite.OpenWeb(); 
&lt;p&gt;SPNavigationNodeCollection topNavigationBarNodes = 
&lt;p&gt;topNavigationWeb.Navigation.TopNavigationBar; 
&lt;p&gt;SPNavigationNode headerMenuItem = new SPNavigationNode(&amp;quot;Administration&amp;quot;, &amp;quot;&amp;quot;, false); 
&lt;p&gt;topNavigationBarNodes.AddAsFirst(headerMenuItem); 
&lt;p&gt;SPNavigationNode externalSubMenuItem1 = new SPNavigationNode(&amp;quot;Site Settings&amp;quot;, topNavigationWeb.Url + &amp;quot;/_layouts/settings.aspx&amp;quot;, true); 
&lt;p&gt;topNavigationBarNodes[0].Children.AddAsFirst(externalSubMenuItem1); 
&lt;p&gt;SPNavigationNode externalSubMenuItem2 = new SPNavigationNode(&amp;quot;Create&amp;quot;, topNavigationWeb.Url + &amp;quot;/_layouts/create.aspx&amp;quot;, true); 
&lt;p&gt;topNavigationBarNodes[0].Children.AddAsFirst(externalSubMenuItem2); 
&lt;p&gt;topNavigationWeb.Update(); 
&lt;p&gt;Here is what the topnavigation top level site looked like when the administrator or the reader user user logged in; the links appear for both users. 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10268/download.aspx" alt="" /&gt; 
&lt;p&gt;I created a &lt;a href="http://www.sharepointblogs.com/files/folders/tbaginski/entry10255.aspx"&gt;handy little Windows Forms Application&lt;/a&gt; you can use to test these concepts out yourself, or build upon the code base to meet your own needs. The application is easy to use, just enter the name of your SharePoint server, then click the buttons from top to bottom and follow along with this article. The application looks like this: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/files/folders/10269/download.aspx" alt="" /&gt; 
&lt;p&gt;I hope this article and the application come in handy for you! Now, it’s time to go skiing! :)&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=10270" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/QuickLaunch/default.aspx">QuickLaunch</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Top+Navigation/default.aspx">Top Navigation</category></item><item><title>SharePoint Connections 2007 Code Samples and Session Materials</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/11/08/SharePoint-Connections-2007-Code-Samples-and-Session-Materials.aspx</link><pubDate>Thu, 08 Nov 2007 16:24:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:8368</guid><dc:creator>tbaginski</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=8368</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/11/08/SharePoint-Connections-2007-Code-Samples-and-Session-Materials.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Updated 11/12/2007:&amp;nbsp;The code for my BDC session is now available and linked to below.&amp;nbsp; Post-conference session materials have been distributed directly to post conference attendees.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;d like to say thank you to everyone who attended my sessions so&amp;nbsp;at this year&amp;#39;s SharePoint Connections Conference.&amp;nbsp; I met so many&amp;nbsp;smart, easy going people at the conference, and the audiences&amp;nbsp;were a real pleasure to present to.&amp;nbsp; It&amp;#39;s not a conference I will soon forget.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.sharepointblogs.com/files/folders/tbaginski/entry8365.aspx" target="_blank"&gt;Click here&lt;/a&gt;, to download the SharePoint Toolkit application that I used during my SharePoint Object Model and Web Services Kick Start session.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.sharepointblogs.com/files/folders/tbaginski/entry8367.aspx" target="_blank"&gt;Click here&lt;/a&gt;, to download the Site Template Package (stp file) for the SharePoint Site used during Todd Baginski&amp;#39;s&amp;nbsp;Using the MOSS SSO Service in Real World Situations&amp;nbsp;session at SharePoint Connections, during November of 2007.&amp;nbsp; This STP contains all the demos, code and instructions that describe how to implement the solutions in your own environment.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.sharepointblogs.com/files/folders/tbaginski/entry8515.aspx" target="_blank"&gt;Click here&lt;/a&gt;, to download the Site Template Package (stp file) for the SharePoint Site used during Todd Baginski&amp;#39;s&amp;nbsp;Getting the Most Out of the Business Data Catalog&amp;nbsp;session at SharePoint Connections, during November of 2007.&amp;nbsp; This STP contains all the demos, code (including the custom BDC Web Part that displays data from the BDC and the Windows Forms application that displays data from the BDC) and instructions that describe how to implement the solutions in your own environment.&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=8368" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint+Connections+2007/default.aspx">SharePoint Connections 2007</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SSO/default.aspx">SSO</category></item><item><title>Creating and deploying VSTO Documents inside SharePoint Document Libraries</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-and-deploying-vsto-documents-inside-sharepoint-document-libraries.aspx</link><pubDate>Thu, 16 Aug 2007 21:27:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:4390</guid><dc:creator>tbaginski</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=4390</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-and-deploying-vsto-documents-inside-sharepoint-document-libraries.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;This is a repost of an article that was lost due to a server crash.&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Visual Studio Tools for Office (VSTO) Documents can be deployed to or utilized as templates for a SharePoint Document Library. The process to develop VSTO Documents, deploy them to the SharePoint server, and set the proper security policies on the client machine in order for the documents to run properly can be easily repeated once you understand all the pieces of the puzzle. 
&lt;p&gt;I have not been able to find complete documentation for this process on the Internet to date. I have found several web pages that provide pieces of the puzzle, but no comprehensive solution. I discussed this architecture with some Microsoft TS’s and they liked the architecture and approach and gave it two thumbs up. 
&lt;p&gt;&lt;b&gt;VSTO Document Basics&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;To begin, it is important to understand how the VSTO Documents, the SharePoint server, and the target client machines interact. 
&lt;p&gt;The following diagram helps illustrate the architecture: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/photos/tbaginski/images/4391/original.aspx" alt="" /&gt; 
&lt;p&gt;VSTO Documents contain a Deployment Manifest. Inside the Document’s Deployment Manifest, the location of the Assembly the VSTO Document relies upon is stored. This Deployment Manifest can be modified programmatically to point to any location where the Assembly the Document relies upon is stored. By default the Deployment Manifest specifies that the Assembly the document relies upon is stored in the same directory as the Document. 
&lt;p&gt;The VSTO Document’s Assembly can be deployed to any file share the user who opens the VSTO document has access to. This location can be on a stand alone file server, or even a file share on the SharePoint server itself. The VSTO Document’s Assembly is a .dll file. 
&lt;p&gt;In order for the client machine to properly load and render the VSTO Document and related Assembly, the client machine needs to trust the location from which the VSTO Document is opened and the location from which the Assembly is opened. Creating Security Policies on the client machine that trust the location from which the VSTO Document is opened allows the VSTO Document to properly load and render. 
&lt;p&gt;&lt;b&gt;Scenario&lt;/b&gt; 
&lt;p&gt;The following scenario will be used as an example to demonstrate how to develop, configure and deploy a VSTO Document that will be used as a template for a SharePoint Document Library. Terms that appear in parenthesis are used to represent the various components of the solution and maintain consistency throughout the instructions. 
&lt;p&gt;An existing Word Document Template (Sample.dot) utilizes Macros to fill data in the Word Document Template. The majority of the data the users enter into the Macros to fill the document exists within a database, however users are presently keying the information into the Macro prompts manually. The document needs to be migrated to the VSTO format (VSTOSample.dot) in order to take advantage of the data in the database to expedite document creation. 
&lt;p&gt;Once the existing Word Document Template has been converted to the VSTO format the VSTO Document Template should be deployed as a template for a given document library (Sample Document Library) on the SharePoint Server (SampleSharePointServer). 
&lt;p&gt;Users must be able to open the VSTO Document Template from the Sample Document Library on the SampleSharePointServer and create a new Word Document from the VSTO Document Template. The new Word Document should be able to be saved to the Sample Document Library. 
&lt;p&gt;&lt;b&gt;Prerequisites&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;This solution utilizes the following technologies: 
&lt;p&gt;Development environment: 
&lt;p&gt;Microsoft Office SharePoint Server 2007 (MOSS 2007) 
&lt;p&gt;Visual Studio .NET 2005 
&lt;p&gt;Visual Studio Tools for Office 2005 (VSTO 2005) 
&lt;p&gt;Client Machine: 
&lt;p&gt;Please see the following web page on the MSDN for client machine prerequisites and instructions for installing the prerequisites: 
&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/2ac08ee2(VS.80).aspx"&gt;http://msdn2.microsoft.com/en-us/library/2ac08ee2(VS.80).aspx&lt;/a&gt; 
&lt;p&gt;&lt;b&gt;The Solution&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;To successfully implement the aforementioned scenario several tasks need to be done. 
&lt;p&gt;These tasks are as follows: 
&lt;ul&gt;
&lt;li&gt;Convert the existing Word Document Template (Sample.dot) to the VSTO format (VSTOSample.dot). 
&lt;li&gt;Create a share on a stand alone file server or the SampleSharePointServer server (This example uses a file share on the SampleSharePointServer.) 
&lt;li&gt;Edit the VSTO Document Deployment Manifest to point to the file share where the VSTO Document’s Assembly is stored. 
&lt;li&gt;Create a new Sample Document Library Feature in SharePoint for the document library that will utilize the VSTO Document Template. (Please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article for instructions.) 
&lt;li&gt;Install the Sample Document Library Feature on the SampleSharePointServer. (Please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article for instructions.) 
&lt;li&gt;Register the Sample Document Library Feature on the site definition you want the Sample Document Library to be created on when a new SharePoint site is created based on that site definition. (Please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/adding-a-document-library-feature-to-a-site-definition-in-wss-v3-moss-2007.aspx"&gt;Adding a Document Library Feature to a Site Definition in WSS V3 / MOSS 2007&lt;/a&gt; article for instructions.) 
&lt;li&gt;Deploy the VSTOSample.dot file to the SampleSharePointServer. 
&lt;li&gt;Deploy the VSTOSample.dll to the file share on the SampleSharePointServer. 
&lt;li&gt;Create Security Policies on the client machine that trust the location the VSTOSample.dot file will be opened from. 
&lt;li&gt;Test and rejoice!&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Step 1: Convert the existing Word Document Template (Sample.dot) to the VSTO format (VSTOSample.dot)&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;To convert an existing Word Document Template (Sample.dot) to the VSTO format follow these steps: 
&lt;p&gt;Open Visual Studio .NET 2005. 
&lt;p&gt;Click File | New | Project. 
&lt;p&gt;Under Visual C# | Office, select Word Template. 
&lt;p&gt;Name the Project VSTOSample. 
&lt;p&gt;Click OK. 
&lt;p&gt;Select Copy an existing document. (Sample.dot) 
&lt;p&gt;Click OK. 
&lt;p&gt;At this point VS.NET 2005 converts the existing Sample.dot file to the VSTO format. 
&lt;p&gt;Rename Sample.dot in the VS.NET IDE to VSTOSample.dot. 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; This can also be done for Word Documents, Excel Workbooks and Excel Templates. 
&lt;p&gt;Select Word Document during project creation to convert a .doc file to the VSTO format. 
&lt;p&gt;Select Excel Workbook during project creation to convert a .xls file to the VSTO format. 
&lt;p&gt;Select Excel Template during project creation to convert a .xlt file to the VSTO format. 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; If you are not converting an existing Document follow the same steps as above except select Create a new document instead of Copy an existing document when the dialogue with these options appears during project creation. 
&lt;p&gt;Build the project. 
&lt;p&gt;Now let’s put some code into the document that will let us know the document was able to access the Assembly and execute code from it after we have deployed the document. 
&lt;p&gt;Open the ThisDocument.cs file in the VSTOSample project in the VS.NET 2005 IDE. 
&lt;p&gt;Add the following code to the ThisDocument_Startup method. 
&lt;p&gt;MessageBox.Show(&amp;quot;I&amp;#39;d rather be skiing!&amp;quot;); 
&lt;p&gt;Run the project. When the project runs the document will appear, then a textbox will appear with the message “I’d rather be skiing!”. 
&lt;p&gt;Click OK on the message box and close the document. 
&lt;p&gt;Let’s add some more code to the document to demonstrate how a VSTO document can be more efficient at populating documents with information compared to Macros. 
&lt;p&gt;First we will add an ActionsPane to the VSTO Document so we have a place to put some simple controls. 
&lt;p&gt;In the Visual Studio .NET 2005 IDE right click the VSTOSample project. 
&lt;p&gt;Click Add | New Item 
&lt;p&gt;Select Actions Pane Control 
&lt;p&gt;Name the control ActionsPane.cs 
&lt;p&gt;Click Add 
&lt;p&gt;Return to the ThisDocument.cs file in the VSTOSample project in the VS.NET 2005 IDE. 
&lt;p&gt;Add the following code at the class level: 
&lt;p&gt;Private ActionPane actionPane = new ActionPane(); 
&lt;p&gt;Add the following code to the ThisDocument_Startup method: 
&lt;p&gt;this.ActionsPane.Controls.Add(actionPane); 
&lt;p&gt;Run the project. When the project runs the document will appear, then a textbox will appear with the message “I’d rather be skiing!” After you click the OK button the Document Actions Pane will appear on the right side of the VSTO Document. 
&lt;p&gt;Close the document. 
&lt;p&gt;Now let’s add some controls to the Actions Pane. 
&lt;p&gt;Open the ActionPane in design mode in VS.NET 2005. 
&lt;p&gt;Drag a ComboBox Control and drop it on the ActionsPane designer surface. 
&lt;p&gt;Name the ComboBox resortsComboBox 
&lt;p&gt;Right click the resortsComboBox control and select Properties 
&lt;p&gt;In the Properties Pane scroll to the Items Property and click the … button 
&lt;p&gt;Add the following items to the collection of items: 
&lt;p&gt;Arapahoe Basin 
&lt;p&gt;Wolf Creek Ski Area 
&lt;p&gt;Vail 
&lt;p&gt;Telluride 
&lt;p&gt;Steamboat 
&lt;p&gt;Alta 
&lt;p&gt;Now, let’s add a control to the document to display our favorite ski resort. 
&lt;p&gt;Open the VSTOSample.dot file in the VSTOSample project in design mode. 
&lt;p&gt;Add in a BookMark control to the ToolBox in the VS.NET 2005 IDE. 
&lt;p&gt;Right click on the ToolBox in the VS.NET 2005 IDE. 
&lt;p&gt;Click Choose Items… 
&lt;p&gt;Sort by Namespace 
&lt;p&gt;Select all the items in the Microsoft.Office.Tools.Word namespace. 
&lt;p&gt;Click OK 
&lt;p&gt;Type the words “My favorite ski resort is: “ into the document. 
&lt;p&gt;Drag a BookMark Control into the document and drop it at the end of the line you just typed. 
&lt;p&gt;Name the control favoriteSkiResortBookMark 
&lt;p&gt;Finally, let’s add an event handler to the resortsComboBox control to populate the document with the ski resort selected in the resortsComboBox. 
&lt;p&gt;Click the button to display the Event Handlers for the resortsComboBox control. 
&lt;p&gt;Double click in the SelectedIndexChanged event to create the event handler. 
&lt;p&gt;Open the ActionPane.cs file in code view. 
&lt;p&gt;Add the following code to the resortsComboBox_SelectedIndexChanged event handler method: 
&lt;p&gt;Globals.ThisDocument.favoriteSkiResortBookMark.Text = resortsComboBox.Text; 
&lt;p&gt;Run the project. Just like last time, when the project runs the document will appear, then a textbox will appear with the message “I’d rather be skiing!” After you click the OK button the Document Actions Pane will appear on the right side of the VSTO Document. The resortsComboBox control will be populated with the ski resorts you enetered. Selecting an item in the resortsComboBox will populate the document with the name of the selected ski resort in the location where you placed the favoriteSkiResortBookMark control. 
&lt;p&gt;Close the VSTOSample project. 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; This is a very simple demonstration that illustrates the power of VSTO Documents. Although the data in this example (The Ski Resort Names) does not come from a database, you can easily utilize the power of ADO.NET to return information from a database to populate data bound controls in the Actions Pane. Web Service calls may be used to retrieve the data from back end data sources, so your documents remain loosely coupled to your data layer. 
&lt;p&gt;&lt;b&gt;Step 2: Create a share on a stand alone file server or the SampleSharePointServer server (This example uses a file share on the SampleSharePointServer.)&lt;/b&gt; 
&lt;p&gt;I’m going to assume you know how to do this. For example’s sake I’ll call this share: VSTODocs 
&lt;p&gt;&lt;b&gt;Step 3: Edit the VSTO Document Deployment Manifest to point to the file share where the VSTO Document’s Assembly is stored.&lt;/b&gt; 
&lt;p&gt;I’ve taken care of wrapping the code that does this inside a handy little Windows Form Application that will do this for you. The &lt;a class="" title="VSTO Document Deployment Manifest Editor application" href="http://www.sharepointblogs.com/files/folders/tbaginski/entry4393.aspx" target="_blank"&gt;VSTO Document Deployment Manifest Editor&lt;/a&gt; application allows you to easily edit the VSTO Document Deployment Manifest to point to the location where you will deploy the Assembly for the VSTO Document. 
&lt;p&gt;Here is a screenshot of the application: 
&lt;p&gt;&lt;img src="http://www.sharepointblogs.com/photos/tbaginski/images/4392/original.aspx" alt="" /&gt; 
&lt;p&gt;To edit the VSTO Document’s Deployment Manifest simply click the Browse button and browse to the location of the VSTOSample.dot file then select it. 
&lt;p&gt;Then type in the UNC path for the file share you created in Step 2. (Make sure you type in the name of the .dll at the end of the path!) 
&lt;p&gt;Click the Edit Document Deployment Manifest button and you are done. 
&lt;p&gt;There is hardly any code under the hood here that actually edits the Document’s Deployment Manifest. I found the code to do this on the MSDN. 
&lt;p&gt;Here is the link to the page on the MSDN that has the code: 
&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/kck1ffhz(VS.80).aspx"&gt;http://msdn2.microsoft.com/en-us/library/kck1ffhz(VS.80).aspx&lt;/a&gt; 
&lt;p&gt;&lt;strong&gt;Step 4: Create a new Sample Document Library Feature in SharePoint for the document library that will utilize the VSTO Document Template. (Please see the &lt;/strong&gt;&lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;&lt;strong&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; article for instructions.)&lt;/strong&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;strong&gt;Step 5: Install the Sample Document Library Feature on the SampleSharePointServer. (Please see the &lt;/strong&gt;&lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;&lt;strong&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; article for instructions.)&lt;/strong&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;Step 6: Register the Sample Document Library Feature on the site definition you want the Sample Document Library to be created on when a new SharePoint site is created based on that site definition. (Please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/adding-a-document-library-feature-to-a-site-definition-in-wss-v3-moss-2007.aspx"&gt;Adding a Document Library Feature to a Site Definition in WSS V3 / MOSS 2007&lt;/a&gt; article for instructions.)&lt;/b&gt; 
&lt;p&gt;These steps can be skipped if you do not want to make the document a template in a SharePoint Document Library. If you don’t want to make the document a template in a SharePoint Document Library and merely wish to upload the document to a SharePoint Document Library then proceed. 
&lt;p&gt;If you want to make the document a template in a SharePoint Document Library by using a SharePoint Feature please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article for instructions. 
&lt;p&gt;&lt;b&gt;Step 7: Deploy the VSTOSample.dot file to the SampleSharePointServer.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;If you chose to perform steps 4, 5 and 6 then this task will already be accomplished. 
&lt;p&gt;If you chose not to perform steps 4, 5 and 6 then create a new SharePoint Site. 
&lt;p&gt;For examples sake create a site at the following location: 
&lt;p&gt;&lt;a href="http://samplesharepointserve/SiteDirectory/VSTOSample"&gt;http://SampleSharePointServe/SiteDirectory/VSTOSample&lt;/a&gt; 
&lt;p&gt;Create a Document Library in the new VSTOSample SharePoint Site you created. Name the Document Library ‘Sample Document Library’. Upload the VSTOSample.dot file to the new Document Library you just created. 
&lt;p&gt;&lt;b&gt;Step 8: Deploy the VSTOSample.dll to the file share on the SampleSharePointServer.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Copy the VSTOSample.dll file to the VSTODocs file share on the SampleSharePointServer. 
&lt;p&gt;&lt;b&gt;Step 9: Create Security Policies on the client machine that trust the location the VSTOSample.dot file will be opened from.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The following commands are executed on the command line on the client machine. 
&lt;p&gt;These commands set up the necessary Security Policies on the client machine that specify the client trusts the location from which the VSTO Document was opened and the location where the Assembly is stored. 
&lt;p&gt;%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag LocalIntranet_Zone -url &amp;quot;\\SampleSharePointServer\vstodocs\*&amp;quot; FullTrust -n &amp;quot;VSTO Documents&amp;quot; 
&lt;p&gt;%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag LocalIntranet_Zone -url &amp;quot;http://SampleSharePointServer/sitedirectory/*&amp;quot; FullTrust -n &amp;quot;VSTO SharePoint Documents&amp;quot; 
&lt;p&gt;You’ll notice in both commands I use a wildcard in the paths. This allows me to trust all the documents and assemblies that are opened from these locations. In a development environment this is a nice approach to take because security is not a big consideration. However, in a production environment I recommend changing these paths to point to the particular VSTO Document and related Assembly. 
&lt;p&gt;These commands came from the following MSDN article: 
&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms404837(VS.80).aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms404837(VS.80).aspx&lt;/a&gt; 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; To reset Security Policies to their default configuration run the following command at the command line on the client: 
&lt;p&gt;%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -rs 
&lt;p&gt;&lt;b&gt;Step 10: Test and rejoice!&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Open Internet Explorer on the client machine. 
&lt;p&gt;Navigate to the VSTOSample SharePoint Site you created. 
&lt;p&gt;Look at the bottom toolbar of Internet Explorer. 
&lt;p&gt;Check to see the site is in the Local Intranet Zone. (We set the security policies on the Local Intranet Zone, so the paths we set as trusted apply to web sites opened in the Local Intranet Zone.) 
&lt;p&gt;Open the Sample Document Library. 
&lt;p&gt;Open the VSTOSample.dot file. 
&lt;p&gt;The VSTO Word Document Template should open and the “I’d rather be skiing!” Message Box should appear. The resortsComboBox should be populated with data, and selecting a resort will populate the document with the selected ski resort. 
&lt;p&gt;If this functionality works you have successfully deployed the VSTO Document to the SharePoint Document Library! 
&lt;p&gt;Save the VSTOSample VSTO Word Document Template to the Sample Documents Library by clicking File | Save. 
&lt;p&gt;Name the new file VSTOSample – Success. 
&lt;p&gt;Return to Internet Explorer and refresh the Sample Document Library page. 
&lt;p&gt;You will see you now have a Word Document named VSTOSample – Success.doc in the Sample Document Library. 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Nice job! You just made a VSTO document and integrated it with MOSS 2007!&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=4390" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category></item><item><title>Creating a custom Site Definition in WSS V3 / MOSS</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-site-definition-in-wss-v3-moss.aspx</link><pubDate>Thu, 16 Aug 2007 21:20:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:4388</guid><dc:creator>tbaginski</dc:creator><slash:comments>22</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=4388</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-site-definition-in-wss-v3-moss.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;This is a repost of an article that was lost due to a server crash.&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The new version of SharePoint brings some changes to the way Site Definitions are created and deployed to a SharePoint server. Additionally, the way Site Definitions are now architected has changed with the advent of Features. Although FrontPage 2003 has been significantly enhanced to become the Office SharePoint Designer, Features allow for more flexible deployments of functionality within SharePoint, and Master Pages allow us to change the look and feel of many sites inside SharePoint with a single click of a button - custom Site Definitions can still be leveraged to provide outstanding enterprise wide flexibility and ease of maintenance for SharePoint sites. 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Site Definitions are a complex and large topic that we will not delve into in an in depth manner right now. The purpose of this document is to describe how to create a custom Site Definition in order to set the stage for the other documentation. 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;Site Definition basics&lt;/b&gt; 
&lt;p&gt;Site Definitions are located in the following folder on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates 
&lt;p&gt;Each Site Definition has its own sub directory under this folder. 
&lt;p&gt;Inside each Site Definition sub directory the aspx pages for the various web pages and lists that make up the Site Definition are stored. The ONET.XML file that specifies the various configurations and modules the Site Definition is made up of is stored inside the XML subdirectory inside each Site Definition sub directory. 
&lt;p&gt;&lt;b&gt;*Note: &lt;/b&gt;I think it is interesting that the SDK refers to Site Templates as the .stp files that are generated when you save a site as a template from the web UI, and the SDK refers to file based site templates as Site Definitions – yet this directory is named SiteTemplates. 
&lt;p&gt;Site Definitions are registered with SharePoint and made available via the WEBTEMP&amp;lt;NAME OF SITE DEFINITION&amp;gt;.XML file. 
&lt;p&gt;These files are located in the following folder on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML 
&lt;p&gt;&lt;b&gt;Creating a custom Site Definition in MOSS 2007&lt;/b&gt; 
&lt;p&gt;The following tasks are all you need to do to create a custom Site Definition in MOSS 2007. 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Step 1: Clone an existing Site Definition. 
&lt;p&gt;Step 2: Create the WEBTEMP XML fragment file to register the Site Definition with SharePoint. 
&lt;p&gt;Step 3: Reset IIS 
&lt;p&gt;Step 4: Create a site based on the custom Site Definition. 
&lt;p&gt;&lt;b&gt;Step 1: Clone an existing Site Definition.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Navigate to the following directory on the SharePoint server in Windows Explorer: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates 
&lt;p&gt;Copy the STS directory and paste it back into the same directory. 
&lt;p&gt;Rename the Copy of STS directory to SAMPLE 
&lt;p&gt;Navigate to the following directory on the SharePoint server in Windows Explorer: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033 
&lt;p&gt;Copy the STS directory and paste it back into the same directory. 
&lt;p&gt;Rename the Copy of STS directory to SAMPLE 
&lt;p&gt;&lt;b&gt;Step 2: Create the WEBTEMP XML fragment file to register the Site Definition with SharePoint.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Create a file called WEBTEMPSAMPLE.XML in the following directory: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML 
&lt;p&gt;Put the following XML into the WEBTEMPSAMPLE.XML file: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.4017&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Templates xmlns:ows=&amp;quot;Microsoft SharePoint&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Template Name=&amp;quot;SAMPLE&amp;quot; ID=&amp;quot;10001&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Configuration ID=&amp;quot;0&amp;quot; Title=&amp;quot;Sample Site&amp;quot; Hidden=&amp;quot;FALSE&amp;quot; ImageUrl=&amp;quot;/_layouts/images/stsprev.png&amp;quot; Description=&amp;quot;This sample template creates a site for teams to create, organize, and share information quickly and easily. It includes a Document Library, and basic lists such as Announcements, Calendar, Contacts, and Quick Links.&amp;quot; DisplayCategory=&amp;quot;Custom Site Definitions&amp;quot; &amp;gt; &amp;lt;/Configuration&amp;gt; 
&lt;p&gt;&amp;lt;Configuration ID=&amp;quot;1&amp;quot; Title=&amp;quot;Sample Blank Site&amp;quot; Hidden=&amp;quot;FALSE&amp;quot; ImageUrl=&amp;quot;/_layouts/images/stsprev.png&amp;quot; Description=&amp;quot;This sample template creates a Windows SharePoint Services-enabled Web site with a blank home page. You can use a Windows SharePoint Services-compatible Web page editor to add interactive lists or any other Windows SharePoint Services features.&amp;quot; DisplayCategory=&amp;quot;Custom Site Definitions&amp;quot; &amp;gt; &amp;lt;/Configuration&amp;gt; 
&lt;p&gt;&amp;lt;Configuration ID=&amp;quot;2&amp;quot; Title=&amp;quot;Sample Document Workspace&amp;quot; Hidden=&amp;quot;FALSE&amp;quot; ImageUrl=&amp;quot;/_layouts/images/dwsprev.png&amp;quot; Description=&amp;quot;This sample template creates a site for colleagues to work together on documents. It provides a document library for storing the primary document and supporting files, a Task list for assigning to-do items, and a Links list for resources related to the document.&amp;quot; DisplayCategory=&amp;quot;Custom Site Definitions&amp;quot; &amp;gt; &amp;lt;/Configuration&amp;gt; 
&lt;p&gt;&amp;lt;/Template&amp;gt; 
&lt;p&gt;&amp;lt;/Templates&amp;gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;*Note: &lt;/b&gt;The DisplayCategory attribute of the &amp;lt;Configuration&amp;gt; element dictates which tab the configuration will appear on in the Template Selection section of the create site web page. You can create your own tabs by putting your own values in this attribute (like we have done here). 
&lt;p&gt;Save the file. 
&lt;p&gt;&lt;b&gt;Step 3: Reset IIS&lt;/b&gt; 
&lt;p&gt;Open a command prompt on the SharePoint server. 
&lt;p&gt;Type in the command: iisreset 
&lt;p&gt;Wait for IIS to reset 
&lt;p&gt;&lt;b&gt;Step 4: Create a site based on the custom Site Definition.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Open Internet Explorer 
&lt;p&gt;Navigate to the Sites Directory in your SharePoint portal (&lt;a href="http://sharepointservername/SiteDirectory"&gt;http://SharePointServerName/SiteDirectory&lt;/a&gt;) 
&lt;p&gt;Click the Create Site Link 
&lt;p&gt;Fill out the information on the form. 
&lt;p&gt;Notice at the bottom of the page in the Template Selection section the new Custom Site Definitions tab. 
&lt;p&gt;Click this tab and select one of the available configurations. 
&lt;p&gt;Click the Create button.&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=4388" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category></item><item><title>Adding a Document Library Feature to a Site Definition in WSS V3 / MOSS 2007</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/adding-a-document-library-feature-to-a-site-definition-in-wss-v3-moss-2007.aspx</link><pubDate>Thu, 16 Aug 2007 21:17:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:4387</guid><dc:creator>tbaginski</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=4387</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/adding-a-document-library-feature-to-a-site-definition-in-wss-v3-moss-2007.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;This is a repost of an article that was lost due to a server crash.&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;One of the nicest things about Features in the new version of SharePoint is their ability to be added to a Site Definition by default. When you add a Feature to a Site Definition, that Feature is automatically available on a SharePoint site when you create a SharePoint site from the given Site Definition. 
&lt;p&gt;This functionality allows developers to build Features and plug them into any Site Definition they choose. In the last version of SharePoint, functionality that can now be delivered in the form of a Feature had to be registered and configured for each Site Definition that utilized the functionality. This is no longer the case because Features encapsulate of all the functionality they deliver. 
&lt;p&gt;&lt;b&gt;Plug and play functionality&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The relationship between Site Definitions and Features reminds me of the Plug and Play architecture Windows uses to add hardware to your computer. 
&lt;p&gt;Windows is a platform which requires a driver to recognize a particular piece of hardware. The driver is responsible for knowing everything about the hardware and it defines how Windows interacts and utilizes the hardware. 
&lt;p&gt;SharePoint and Site Definitions are like Windows in this analogy and Features are the hardware. The Feature.xml file acts like a driver that tells SharePoint and Site Definitions everything about the Feature and defines how SharePoint and the Site Definition interact with and utilize the Feature. 
&lt;p&gt;&lt;b&gt;Adding Features to Site Definitions&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;In the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article the SharePoint Feature architecture and the process to create a Feature is explained. Once you have created your own custom Feature you can easily add it to a custom Site Definition. This is perhaps the easiest thing I have found out how to do in the SharePoint V3 so far. Please see the &lt;a class="" href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-site-definition-in-wss-v3-moss.aspx" target="_blank"&gt;Creating a custom Site Definition in WSS V3 / MOSS 2007 article&lt;/a&gt; to learn how to create a custom Site Definition. 
&lt;p&gt;This short list of tasks will show you how to add a Feature to a Site Definition. 
&lt;p&gt;Step 1: Edit the ONET.XML file for the Site Definition you wish to add the feature to. 
&lt;p&gt;Step 2: Reset IIS on the SharePoint server. 
&lt;p&gt;Step 3: Create a new SharePoint site based on the Site Definition you added the Feature to. 
&lt;p&gt;Short list, eh? See, I told you this was simple! 
&lt;p&gt;&lt;b&gt;Step 1: Edit the ONET.XML file for the Site Definition you wish to add the feature to.&lt;/b&gt; 
&lt;p&gt;This example assumes you have created a custom Site Definition named SAMPLE. Please see the &lt;a class="" target="_blank"&gt;Creating a custom Site Definition in WSS V3 / MOSS 2007 article&lt;/a&gt; for instructions. 
&lt;p&gt;Open the ONET.XML file for the Site Definition you wish to edit. 
&lt;p&gt;The ONET.XML file can be found at the following location on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\SAMPLE\XML\ONET.XML 
&lt;p&gt;Find the section in the ONET.XML file that corresponds to the configuration for the Sample Team Site. The XML Looks like this: 
&lt;p&gt;&amp;lt;Configuration ID=&amp;quot;0&amp;quot; Name=&amp;quot;Default&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Lists&amp;gt; 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;00BFEA71-E717-4E80-AA17-D0C71B360101&amp;quot; Type=&amp;quot;101&amp;quot; Title=&amp;quot;$Resources:core,shareddocuments_Title;&amp;quot; Url=&amp;quot;$Resources:core,shareddocuments_Folder;&amp;quot; QuickLaunchUrl=&amp;quot;$Resources:core,shareddocuments_Folder;/Forms/AllItems.aspx&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;00BFEA71-6A49-43FA-B535-D15C05500108&amp;quot; Type=&amp;quot;108&amp;quot; Title=&amp;quot;$Resources:core,discussions_Title;&amp;quot; Url=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,discussions_Folder;&amp;quot; QuickLaunchUrl=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,discussions_Folder;/AllItems.aspx&amp;quot; EmailAlias=&amp;quot;$Resources:core,discussions_EmailAlias;&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;00BFEA71-D1CE-42de-9C63-A44004CE0104&amp;quot; Type=&amp;quot;104&amp;quot; Title=&amp;quot;$Resources:core,announceList;&amp;quot; Url=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,announce_Folder;&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Data&amp;gt; 
&lt;p&gt;&amp;lt;Rows&amp;gt; 
&lt;p&gt;&amp;lt;Row&amp;gt; 
&lt;p&gt;&amp;lt;Field Name=&amp;quot;Title&amp;quot;&amp;gt;$Resources:onetid11;&amp;lt;/Field&amp;gt; 
&lt;p&gt;&amp;lt;Field Name=&amp;quot;Body&amp;quot;&amp;gt;$Resources:onetid12;&amp;lt;/Field&amp;gt; 
&lt;p&gt;&amp;lt;Field Name=&amp;quot;Expires&amp;quot;&amp;gt;&amp;amp;lt;ows:TodayISO/&amp;amp;gt;&amp;lt;/Field&amp;gt; 
&lt;p&gt;&amp;lt;/Row&amp;gt; 
&lt;p&gt;&amp;lt;/Rows&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;&amp;lt;/List&amp;gt; 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;00BFEA71-2062-426C-90BF-714C59600103&amp;quot; Type=&amp;quot;103&amp;quot; Title=&amp;quot;$Resources:core,linksList;&amp;quot; Url=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,links_Folder;&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;00BFEA71-EC85-4903-972D-EBE475780106&amp;quot; Type=&amp;quot;106&amp;quot; Title=&amp;quot;$Resources:core,calendarList;&amp;quot; Url=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,calendar_Folder;&amp;quot; QuickLaunchUrl=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,calendar_Folder;/Calendar.aspx&amp;quot; EmailAlias=&amp;quot;$Resources:core,calendar_EmailAlias;&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;00BFEA71-A83E-497E-9BA0-7A5C597D0107&amp;quot; Type=&amp;quot;107&amp;quot; Title=&amp;quot;$Resources:core,taskList;&amp;quot; Url=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,tasks_Folder;&amp;quot; QuickLaunchUrl=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,tasks_Folder;/AllItems.aspx&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/Lists&amp;gt; 
&lt;p&gt;&amp;lt;Modules&amp;gt; 
&lt;p&gt;&amp;lt;Module Name=&amp;quot;Default&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/Modules&amp;gt; 
&lt;p&gt;&amp;lt;SiteFeatures&amp;gt; 
&lt;p&gt;&amp;lt;!-- BasicWebParts Feature --&amp;gt; 
&lt;p&gt;&amp;lt;Feature ID=&amp;quot;00BFEA71-1C5E-4A24-B310-BA51C3EB7A57&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/SiteFeatures&amp;gt; 
&lt;p&gt;&amp;lt;WebFeatures&amp;gt; 
&lt;p&gt;&amp;lt;!-- TeamCollab Feature --&amp;gt; 
&lt;p&gt;&amp;lt;Feature ID=&amp;quot;00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/WebFeatures&amp;gt; 
&lt;p&gt;&amp;lt;/Configuration&amp;gt; 
&lt;p&gt;In the &amp;lt;SiteFeatures&amp;gt; element add the following XML to add your own custom Document Library Feature (Please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article for instructions on how to create a custom Document Library Feature.): 
&lt;p&gt;&amp;lt;!-- Custom Common Document Library Feature --&amp;gt; 
&lt;p&gt;&amp;lt;Feature ID=&amp;quot;&amp;lt;GUID OF YOUR FEATURE GOES HERE&amp;gt;&amp;quot; /&amp;gt; 
&lt;p&gt;The &amp;lt;GUID OF YOUR FEATURE GOES HERE&amp;gt; portion of the XML above should be replaced with the GUID you created for your feature. This GUID is found in the ID attribute of the &amp;lt;Feature&amp;gt; element inside the Feature.xml file that corresponds to the custom Document Library Feature you are adding. 
&lt;p&gt;Save the ONET.XML file. 
&lt;p&gt;&lt;b&gt;Step 2: Reset IIS on the SharePoint server.&lt;/b&gt; 
&lt;p&gt;On the SharePoint server type iisreset on the command line and wait for IIS to reset. 
&lt;p&gt;&lt;b&gt;Step 3: Create a new SharePoint site based on the Site Definition you added the Feature to.&lt;/b&gt; 
&lt;p&gt;Open Internet Explorer. 
&lt;p&gt;Browse to the &lt;a href="http://sharepointservername/SiteDirectory/CustDocLib"&gt;http://SharePointServerName/SiteDirectory/&lt;/a&gt; site. 
&lt;p&gt;Click Create Site 
&lt;p&gt;In the Title and URL Name textboxes enter CustomDocLibFeatureSite 
&lt;p&gt;In the Template Selection area of the web page click the Custom Site Definitions tab and select the Sample Site template. 
&lt;p&gt;Click the Create button. 
&lt;p&gt;When the newly created web site appears, click Site Actions and select Site Settings. 
&lt;p&gt;Under the Site Administration section, click the Site Features link. 
&lt;p&gt;You will see you Custom Document Library Feature in the list! 
&lt;p&gt;To activate the Feature, click on the Activate Button next to the Feature in the list. 
&lt;p&gt;To create your own Custom Document Library based on this Feature follow these steps: 
&lt;p&gt;Click Site Settings 
&lt;p&gt;Click Create 
&lt;p&gt;Click Custom Document Library 
&lt;p&gt;Fill in the required information and create the Custom Document Library. 
&lt;p&gt;If you created a custom Document Template in the Document Template dropdown select Custom Document Library for the template. 
&lt;p&gt;Click Create. 
&lt;p&gt;If you created a custom Document Template clicking the new button on the Custom Document Library toolbar will open the custom Document Template you created. 
&lt;p&gt;&lt;b&gt;The beat goes on&lt;/b&gt; 
&lt;p&gt;Let’s take things one step further now. Instead of just adding the Custom Document Library Feature to the Site Definition and making it available, let’s create a Custom Document Library list from the Feature when the site is created. This way users will not have to create the Custom Document Library list themselves after the site is created. 
&lt;p&gt;The tasks to do this are just as simple as the tasks we just performed. Here is a list of the tasks necessary to make the Custom Document Library Feature list created by default when the site is created from our custom Site Definition. 
&lt;p&gt;Step 1: Edit the ONET.XML file for the Site Definition you wish to create the custom Document Library list on. 
&lt;p&gt;Step 2: Reset IIS on the SharePoint server. 
&lt;p&gt;Step 3: Create a new SharePoint site based on the Site Definition you added the Feature to. 
&lt;p&gt;&lt;b&gt;Step 1: Edit the ONET.XML file for the Site Definition you wish to create the custom Document Library list on. &lt;/b&gt;
&lt;p&gt;Make sure you are editing the same custom Site Definition that you added the Feature to. If you try to create a list for a Site Definition that does not implement the Feature the list relies upon, an error will occur during site creation indicating the Feature the list relies upon is not available. 
&lt;p&gt;This example assumes you have created a custom Site Definition named SAMPLE. Please see the &lt;a class="" target="_blank"&gt;Creating a custom Site Definition in WSS V3 / MOSS 2007 article&lt;/a&gt;&amp;nbsp;for instructions. 
&lt;p&gt;Open the ONET.XML file for the Site Definition you wish to edit. 
&lt;p&gt;The ONET.XML file can be found at the following location on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\SAMPLE\XML\ONET.XML 
&lt;p&gt;In the &amp;lt;Lists&amp;gt; element under the Configuration section we just edited, add the following XML to add your own custom Document Library Feature. (Please see the &lt;a class="" href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007 article&lt;/a&gt; for instructions on how to create a custom Document Library Feature): 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;&amp;lt;GUID OF YOUR FEATURE GOES HERE&amp;gt;&amp;quot; 
&lt;p&gt;Type=&amp;quot;4000&amp;quot; 
&lt;p&gt;Title=&amp;quot;Custom Document Library&amp;quot; 
&lt;p&gt;Url=&amp;quot;Custom Document Library&amp;quot; 
&lt;p&gt;QuickLaunchUrl=&amp;quot;Custom Document Library/Forms/AllItems.aspx&amp;quot; /&amp;gt; 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; You can use your own custom Resources file to provide the values for the Title, UTL, and QuickLaunchUrl attributes. Please see the &lt;a class="" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007 article&lt;/a&gt;&amp;nbsp;for further details. If you have already created a custom Resource file as described in the &lt;a class="" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007 article&lt;/a&gt;&amp;nbsp;your XML will look like this: 
&lt;p&gt;&amp;lt;List FeatureId=&amp;quot;&amp;lt;GUID OF YOUR FEATURE GOES HERE&amp;gt;&amp;quot; 
&lt;p&gt;Type=&amp;quot;4000&amp;quot; 
&lt;p&gt;Title=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibrary_Title;&amp;quot; 
&lt;p&gt;Url=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibrary_Folder;&amp;quot; 
&lt;p&gt;QuickLaunchUrl=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibrary_Folder;/Forms/AllItems.aspx&amp;quot; /&amp;gt; 
&lt;p&gt;Save the ONET.XML file. 
&lt;p&gt;&lt;b&gt;Step 2: Reset IIS on the SharePoint server.&lt;/b&gt; 
&lt;p&gt;On the SharePoint server type iisreset on the command line and wait for IIS to reset. 
&lt;p&gt;&lt;b&gt;Step 3: Create a new SharePoint site based on the Site Definition you added the Feature to.&lt;/b&gt; 
&lt;p&gt;Open Internet Explorer. 
&lt;p&gt;Browse to the &lt;a href="http://sharepointservername/SiteDirectory/CustDocLib"&gt;http://SharePointServerName/SiteDirectory/&lt;/a&gt; site. 
&lt;p&gt;Click Create Site 
&lt;p&gt;In the Title and URL Name textboxes enter CustomDocLibFeatureListCreatedSite 
&lt;p&gt;In the Template Selection area of the web page click the Custom Site Definitions tab and select the Sample Site template. 
&lt;p&gt;Click the Create button. 
&lt;p&gt;When the newly create web site appears you will see the Custom Document Library list link on the QuickLaunch navigation menu. 
&lt;p&gt;Click the Custom Document Library link to go to the Custom Document Library list. 
&lt;p&gt;&lt;b&gt;The Midas touch!&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Let’s put the finishing touches on our work now. In addition to creating the list by default, let’s place a view of the Custom Document Library list on the home page of our custom Site Definition when the site is created. 
&lt;p&gt;Once again, this is a very simple task to perform. Here are the steps: 
&lt;p&gt;Step 1: Edit the ONET.XML file for the Site Definition you wish to create a default view on the home page of the custom Document Library list on. 
&lt;p&gt;Step 2: Reset IIS on the SharePoint server. 
&lt;p&gt;Step 3: Create a new SharePoint site based on the Site Definition you added the Feature to. 
&lt;p&gt;&lt;b&gt;Step 1: Edit the ONET.XML file for the Site Definition you wish to create a default view on the home page of the custom Document Library list on.&lt;/b&gt; 
&lt;p&gt;Make sure you are editing the same custom Site Definition that you added the Feature to and created the list on be default. If you try to create a list for a Site Definition that does not implement the Feature the list relies upon an error will occur during site creation indicating the Feature the list relies upon is not available. If you try to create a view of the list and that list has not been automatically created you will get an error during site creation that tells you the list does not exist. (Well, actually the error is ‘Cannot complete this action’) 
&lt;p&gt;This example assumes you have created a custom Site Definition named SAMPLE. Please see the &lt;a class="" target="_blank"&gt;Creating a custom Site Definition in WSS V3 / MOSS 2007 article&lt;/a&gt; for instructions. 
&lt;p&gt;Open the ONET.XML file for the Site Definition you wish to edit. 
&lt;p&gt;The ONET.XML file can be found at the following location on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\SAMPLE\XML\ONET.XML 
&lt;p&gt;Find the &amp;lt;Module&amp;gt; in the ONET.XML that is invoked by the Configuration we just edited. The XML looks like this: 
&lt;p&gt;&amp;lt;Module Name=&amp;quot;Default&amp;quot; Url=&amp;quot;&amp;quot; Path=&amp;quot;&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;File Url=&amp;quot;default.aspx&amp;quot; NavBarHome=&amp;quot;True&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;View List=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,announce_Folder;&amp;quot; BaseViewID=&amp;quot;0&amp;quot; WebPartZoneID=&amp;quot;Left&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;View List=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,calendar_Folder;&amp;quot; BaseViewID=&amp;quot;0&amp;quot; RecurrenceRowset=&amp;quot;TRUE&amp;quot; WebPartZoneID=&amp;quot;Left&amp;quot; WebPartOrder=&amp;quot;2&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;AllUsersWebPart WebPartZoneID=&amp;quot;Right&amp;quot; WebPartOrder=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;![CDATA[ 
&lt;p&gt;&amp;lt;WebPart xmlns=&amp;quot;http://schemas.microsoft.com/WebPart/v2&amp;quot; xmlns:iwp=&amp;quot;http://schemas.microsoft.com/WebPart/v2/Image&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Assembly&amp;gt;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;lt;/Assembly&amp;gt; 
&lt;p&gt;&amp;lt;TypeName&amp;gt;Microsoft.SharePoint.WebPartPages.ImageWebPart&amp;lt;/TypeName&amp;gt; 
&lt;p&gt;&amp;lt;FrameType&amp;gt;None&amp;lt;/FrameType&amp;gt; 
&lt;p&gt;&amp;lt;Title&amp;gt;$Resources:wp_SiteImage;&amp;lt;/Title&amp;gt; 
&lt;p&gt;&amp;lt;iwp:ImageLink&amp;gt;/_layouts/images/homepage.gif&amp;lt;/iwp:ImageLink&amp;gt; 
&lt;p&gt;&amp;lt;/WebPart&amp;gt; 
&lt;p&gt;]]&amp;gt;&amp;lt;/AllUsersWebPart&amp;gt; 
&lt;p&gt;&amp;lt;View List=&amp;quot;$Resources:core,lists_Folder;/$Resources:core,links_Folder;&amp;quot; BaseViewID=&amp;quot;0&amp;quot; WebPartZoneID=&amp;quot;Right&amp;quot; WebPartOrder=&amp;quot;2&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;NavBarPage Name=&amp;quot;$Resources:core,nav_Home;&amp;quot; ID=&amp;quot;1002&amp;quot; Position=&amp;quot;Start&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;NavBarPage Name=&amp;quot;$Resources:core,nav_Home;&amp;quot; ID=&amp;quot;0&amp;quot; Position=&amp;quot;Start&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/File&amp;gt; 
&lt;p&gt;&amp;lt;/Module&amp;gt; 
&lt;p&gt;The &amp;lt;Module&amp;gt; element specifies the resources that Configurations which invoke this mode use. The &amp;lt;File&amp;gt; element specifies files that the Configuration will implement. Inside the &amp;lt;File&amp;gt; element for the default.aspx page add the following XML to create a view of the Custom Document Library list. 
&lt;p&gt;&amp;lt;View List=&amp;quot;$Resources:core,lists_Folder;/Custom Document Library&amp;quot; BaseViewID=&amp;quot;0&amp;quot; WebPartZoneID=&amp;quot;Left&amp;quot; WebPartOrder=&amp;quot;3&amp;quot; /&amp;gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; You can use your own custom Resources file to provide the value for the List attribute. Please see the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article for further details. If you have already created a custom Resource file as described in the &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Creating a Custom Document Library Feature in WSS V3 / MOSS 2007&lt;/a&gt; article your XML will look like this: 
&lt;p&gt;&amp;lt;View List=&amp;quot;$Resources:core,lists_Folder;/$Resources:customDocumentLibrary,customDocumentLibrary_Folder;&amp;quot; BaseViewID=&amp;quot;0&amp;quot; WebPartZoneID=&amp;quot;Left&amp;quot; WebPartOrder=&amp;quot;3&amp;quot; /&amp;gt; 
&lt;p&gt;Save the ONET.XML file. 
&lt;p&gt;&lt;b&gt;Step 2: Reset IIS on the SharePoint server.&lt;/b&gt; 
&lt;p&gt;On the SharePoint server type iisreset on the command line and wait for IIS to reset. 
&lt;p&gt;&lt;b&gt;Step 3: Create a new SharePoint site based on the Site Definition you added the Feature to.&lt;/b&gt; 
&lt;p&gt;Open Internet Explorer. 
&lt;p&gt;Browse to the &lt;a href="http://sharepointservername/SiteDirectory/CustDocLib"&gt;http://SharePointServerName/SiteDirectory/&lt;/a&gt; site. 
&lt;p&gt;Click Create Site 
&lt;p&gt;In the Title and URL Name textboxes enter CustomDocLibViewOnHomePage 
&lt;p&gt;In the Template Selection area of the web page click the Custom Site Definitions tab and select the Sample Site template. 
&lt;p&gt;Click the Create button. 
&lt;p&gt;You will see the Custom Document Library on the home page!&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=4387" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category></item><item><title>Creating a Custom Document Library Feature in WSS V3 / MOSS 2007</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx</link><pubDate>Thu, 16 Aug 2007 21:12:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:4386</guid><dc:creator>tbaginski</dc:creator><slash:comments>20</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=4386</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-document-library-feature-in-wss-v3-moss-2007.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;This is a repost of an article that was lost due to a server crash.&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;Features are a powerful new set of functionality that MOSS 2007 comes with out of the box. Features allow you to deploy functionality inside your MOSS 2007 portal in a granular and loosely coupled fashion. The Document Library that many of the out of the box site definitions come with in MOSS 2007 is implemented as a feature. Building on this out of the box Document Library Feature you can create your own custom Document Library Features as well. 
&lt;p&gt;&lt;b&gt;Feature Basics&lt;/b&gt; 
&lt;p&gt;To begin, let’s take a look at the directories and files that make up a Feature. 
&lt;p&gt;Features are stored on the SharePoint Server at the following location: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES 
&lt;p&gt;Each Feature on the SharePoint Server has its own sub directory that is created in the directory listed above. 
&lt;p&gt;Inside each Feature sub directory you will find a file named Feature.xml. 
&lt;p&gt;The Feature.xml file holds metadata about the Feature. 
&lt;p&gt;&lt;b&gt;Document Library Features&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Here is the Feature.xml file that is used to create the DocumentLibrary Feature that comes with MOSS 2007: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.4017&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Feature Id=&amp;quot;&lt;b&gt;00BFEA71-E717-4E80-AA17-D0C71B360101&lt;/b&gt;&amp;quot; 
&lt;p&gt;Title=&amp;quot;&lt;b&gt;$Resources:core,documentlibraryFeatureTitle;&lt;/b&gt;&amp;quot; 
&lt;p&gt;Description=&amp;quot;&lt;b&gt;$Resources:core,documentlibraryFeatureDesc;&lt;/b&gt;&amp;quot; 
&lt;p&gt;Version=&amp;quot;&lt;b&gt;1.0.0.0&lt;/b&gt;&amp;quot; 
&lt;p&gt;Scope=&amp;quot;&lt;b&gt;Web&lt;/b&gt;&amp;quot; 
&lt;p&gt;Hidden=&amp;quot;&lt;b&gt;TRUE&lt;/b&gt;&amp;quot; 
&lt;p&gt;DefaultResourceFile=&amp;quot;&lt;b&gt;core&lt;/b&gt;&amp;quot; 
&lt;p&gt;xmlns=&amp;quot;&lt;b&gt;http://schemas.microsoft.com/sharepoint/&lt;/b&gt;&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;ElementManifests&amp;gt; 
&lt;p&gt;&amp;lt;ElementManifest Location=&amp;quot;&lt;b&gt;ListTemplates\DocumentLibrary.xml&lt;/b&gt;&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/ElementManifests&amp;gt; 
&lt;p&gt;&amp;lt;/Feature&amp;gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;The following metadata about the feature is contained in the Feature element in this XML file. 
&lt;p&gt;&lt;b&gt;ID:&lt;/b&gt; The GUID that uniquely identifies the Feature 
&lt;p&gt;&lt;b&gt;Title:&lt;/b&gt; The name of the feature. You will see the name of the Feature displayed on the Site Features web page inside the Site Settings section for a given SharePoint Site. 
&lt;p&gt;&lt;b&gt;Description:&lt;/b&gt; The description of the feature. You will see the description of the Feature displayed on the Site Features web page inside the Site Settings section for a given SharePoint Site. 
&lt;p&gt;&lt;b&gt;Version:&lt;/b&gt; The version of the Feature. 
&lt;p&gt;&lt;b&gt;Scope:&lt;/b&gt; Web or Site are acceptable values here. The scope specifies if the Feature can span an entire site collection, or if the Feature will just be used for an individual sub web. 
&lt;p&gt;&lt;b&gt;Hidden:&lt;/b&gt; TRUE or FALSE are acceptable values here. This setting specifies if the Feature is visible in the list of Features on the Site Features web page mentioned above. You will notice in the XML below that the DocumentLibrary Feature has its Hidden attribute set to TRUE, this is why you do not see the Document Library in the list of Features on the Site Features web page. Therefore the ability to create a Document Library is not able to be turned off by an end user who has access to the Site Features web page. 
&lt;p&gt;&lt;b&gt;DefaultResourceFile:&lt;/b&gt; This is the name of the Resource file the feature relies on to provide it with additional configuration information. (More on Resource files later in this document). 
&lt;p&gt;You will notice the &amp;lt;ElementManifests&amp;gt; element in the Feature.xml file. This element contains the location of another XML file that contains the different &amp;lt;Elements&amp;gt; this Feature implements. 
&lt;p&gt;The &amp;lt;ElementManifest&amp;gt; element specifies that the Feature utilizes a file in the ListTemplates sub directory called DocumentLibrary.xml. The path to sub directories and files is a relative path. 
&lt;p&gt;Here is the DocumentLibrary.xml file that holds the &amp;lt;Elements&amp;gt; implemented by the DocumentLibrary Feature: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.4017&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Elements xmlns=&amp;quot;&lt;b&gt;http://schemas.microsoft.com/sharepoint/&lt;/b&gt;&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;ListTemplate Name=&amp;quot;&lt;b&gt;doclib&lt;/b&gt;&amp;quot; 
&lt;p&gt;Type=&amp;quot;&lt;b&gt;101&lt;/b&gt;&amp;quot; 
&lt;p&gt;BaseType=&amp;quot;&lt;b&gt;1&lt;/b&gt;&amp;quot; 
&lt;p&gt;OnQuickLaunch=&amp;quot;&lt;b&gt;TRUE&lt;/b&gt;&amp;quot; 
&lt;p&gt;SecurityBits=&amp;quot;&lt;b&gt;11&lt;/b&gt;&amp;quot; 
&lt;p&gt;Sequence=&amp;quot;&lt;b&gt;110&lt;/b&gt;&amp;quot; 
&lt;p&gt;DisplayName=&amp;quot;&lt;b&gt;$Resources:core,doclibList;&lt;/b&gt;&amp;quot; Description=&amp;quot;&lt;b&gt;$Resources:core,doclibList_Desc;&lt;/b&gt;&amp;quot; 
&lt;p&gt;Image=&amp;quot;&lt;b&gt;/_layouts/images/itdl.gif&lt;/b&gt;&amp;quot; 
&lt;p&gt;DocumentTemplate=&amp;quot;&lt;b&gt;101&lt;/b&gt;&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/Elements&amp;gt; 
&lt;p&gt;Notice the &amp;lt;ListTemplate&amp;gt; element? This should look familiar to those who have edited the ONET.XML file in the last version of SharePoint. 
&lt;p&gt;The &amp;lt;ListTemplate&amp;gt; element specifies the information needed to make a particular list available on a SharePoint site. The only change to this element you see in this particular example is the addition of the Sequence attribute. As far as I can tell this attribute controls the order of the list on the Create page within a SharePoint site. 
&lt;p&gt;Closer inspection reveals some incredibly powerful technology that has been baked into MOSS 2007 – Resource files. This leads us to the topic of Resource files. 
&lt;p&gt;&lt;b&gt;Resource Files&lt;/b&gt; 
&lt;p&gt;The DisplayName and Description attributes have an interesting item in their values. Let’s examine the DisplayName attribute. 
&lt;p&gt;The value for this attribute is $Resources:core,docLibList. This value specifies that the doclibList value is read from the core Resource file. 
&lt;p&gt;Resource files are stored in the following directory on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources 
&lt;p&gt;Resource files contain key value pairs of information and are used to provide localization capabilities to SharePoint. I believe we will see many developers using Resource files for more than localization in the future because of the power and flexibility they provide. 
&lt;p&gt;The $Resources:core part of the value corresponds to the core.en-US.resx resource file. 
&lt;p&gt;The docLibList part of the value corresponds to the docLibList &amp;lt;Data&amp;gt; element within the core Resource file. 
&lt;p&gt;The XML inside the core resource file that is used to populate the DisplayName and Description attributes of the &amp;lt;ListTemplate&amp;gt; element looks like this: 
&lt;p&gt;&amp;lt;Data Name=&amp;quot;doclibList&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Value&amp;gt;Document Library&amp;lt;/Value&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;&amp;lt;Data Name=&amp;quot;doclibList_Desc&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Value&amp;gt;Create a document library when you have a collection of documents or other files that you want to share. Document libraries support features such as folders, versioning, and check out.&amp;lt;/Value&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;At this time I have not been able to find any documentation regarding these files, so I don’t recommend editing the core resource file, instead, make your own. 
&lt;p&gt;&lt;b&gt;Another Benefit Of Features&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;In the last version of SharePoint the ONET.XML file was very big and contained a large amount of information. With the advent of Features the ONET.XML file shrinks because Features are used to componetize the contents of the ONET.XML file. As we have seen here, the &amp;lt;ListeTemplate&amp;gt; element, previously found in the &amp;lt;ListTemplates&amp;gt; element inside the ONET.XML file has been moved into the Document Library Feature. Other out of the box MOSS 2007 lists utilize this same approach. 
&lt;p&gt;&lt;b&gt;Creating You Own Document Library Feature&lt;/b&gt; 
&lt;p&gt;Creating you own custom Document Library Feature is a simple task once you figure out all the pieces of the puzzle. Here is a list of tasks that you will need to do in order to create your own custom Document Library Feature. 
&lt;p&gt;Step 1: Create a directory for the Feature. 
&lt;p&gt;Step 2: (Optional) Create a custom Resource file. 
&lt;p&gt;Step 3: Create the Feature.xml file for the Feature. 
&lt;p&gt;Step 4: (Optional) Create the &amp;lt;DocumentTemplate&amp;gt; element inside the ONET.XML file if you are using a custom Document Template for your custom Document Library. 
&lt;p&gt;Step 5: Create the ListTemplates sub directory under your new Feature directory. 
&lt;p&gt;Step 6: Create the CustomDocumentLibrary.xml file for the Feature. 
&lt;p&gt;Step 7: Copy the contents of the DocLib sub directory into your new Feature directory. 
&lt;p&gt;Step 8: (Optional) If you plan to use a custom Document Template and you performed Step 4 above - Create a custom Document Template. 
&lt;p&gt;Step 9: (Optional) Copy the custom Document Template you created that will server as the default Document Template for your new custom Document Library to the SharePoint server. 
&lt;p&gt;Step 10: (Optional) Add the Feature to the site definition you want the feature to be installed on by default when the site is created. (Please see the &lt;a class="" href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/adding-a-document-library-feature-to-a-site-definition-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Adding a Document Library Feature to a Site Definition in WSS V3 / MOSS 2007 article&lt;/a&gt;.) 
&lt;p&gt;Step 11: Register the Feature with a SharePoint site via the STSADM.EXE command line utility. 
&lt;p&gt;Step 12: Reset IIS. 
&lt;p&gt;Step 13a: (Assuming you did not do Step 10) Browse to the SharePoint site you registered the feature with. Browse to the Create web page and the custom Document Library will be available in the list of items to create. 
&lt;p&gt;Step 13b: (Assuming you did perform Step 10) Create a new SharePoint site with the site definition you edited in Step 10. Browse to the new site to see the custom Document Library already created for you. 
&lt;p&gt;&lt;b&gt;*Note: &lt;/b&gt;In both cases the custom Document Library Feature will be available on the site. 
&lt;p&gt;&lt;b&gt;Step 1: Create a directory for the Feature.&lt;/b&gt; 
&lt;p&gt;Create a new directory for your Feature in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES directory. 
&lt;p&gt;This example will use the directory named CustomDocumentLibrary. 
&lt;p&gt;&lt;b&gt;Step 2: (Optional) Create a custom Resource file.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Take advantage of the ability to store all your display settings and other items whose values may change frequently in your own Resource file by creating one. 
&lt;p&gt;Create a new file named customDocumentLibrary.en-US.resx in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources directory. 
&lt;p&gt;Inside the file put the following XML: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.4017.1004&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;root&amp;gt; 
&lt;p&gt;&amp;lt;Data Name=&amp;quot;customDocumentLibrary_Title&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Value&amp;gt;Custom Document Library&amp;lt;/Value&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;&amp;lt;Data Name=&amp;quot;customDocumentLibrary_Folder&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Value&amp;gt;Custom Document Library&amp;lt;/Value&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;&amp;lt;Data Name=&amp;quot;customDocumentLibraryDisplayName&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Value&amp;gt;Custom Document Library&amp;lt;/Value&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;&amp;lt;Data Name=&amp;quot;customDocumentLibraryDescription&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;Value&amp;gt;Create a custom document library when you have a collection of documents or other files that you want to share. Custom document libraries support features such as folders, versioning, and check out.&amp;lt;/Value&amp;gt; 
&lt;p&gt;&amp;lt;/Data&amp;gt; 
&lt;p&gt;&amp;lt;/root&amp;gt; 
&lt;p&gt;Save the file. 
&lt;p&gt;&lt;b&gt;Step 3: Create the Feature.xml file for the Feature.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Create a GUID for your feature. You will need to insert this GUID into some of the XML in this document where you see &amp;lt;YOUR GUID HERE&amp;gt;. 
&lt;p&gt;You can create a GUID inside VS.NET 2005 or run the following SQL SELECT statement to return a new GUID. SELECT NewID() 
&lt;p&gt;Create a file named Feature.xml and place it in the CustomDocumentLibrary directory you just created. 
&lt;p&gt;If you performed Step 2 put the following XML in the file: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.4017&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Feature Id=&amp;quot;&amp;lt;YOUR GUID HERE&amp;gt;&amp;quot; 
&lt;p&gt;Title=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibrary_Title;&amp;quot; 
&lt;p&gt;Description=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibraryDescription;&amp;quot; 
&lt;p&gt;Version=&amp;quot;1.0.0.0&amp;quot; 
&lt;p&gt;Scope=&amp;quot;Web&amp;quot; 
&lt;p&gt;Hidden=&amp;quot;FALSE&amp;quot; 
&lt;p&gt;DefaultResourceFile=&amp;quot;customDocumentLibrary&amp;quot; 
&lt;p&gt;xmlns=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;ElementManifests&amp;gt; 
&lt;p&gt;&amp;lt;ElementManifest Location=&amp;quot;ListTemplates\CustomDocumentLibrary.xml&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/ElementManifests&amp;gt; 
&lt;p&gt;&amp;lt;/Feature&amp;gt; 
&lt;p&gt;If you did not perform Step 2 put the following XML in the file: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.4017&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Feature Id=&amp;quot;&amp;lt;YOUR GUID HERE&amp;gt;&amp;quot; 
&lt;p&gt;Title=&amp;quot;Custom Document Library&amp;quot; 
&lt;p&gt;Description=&amp;quot;Create a custom document library when you have a collection of documents or other files that you want to share. Custom document libraries support features such as folders, versioning, and check out.&amp;quot; 
&lt;p&gt;Version=&amp;quot;1.0.0.0&amp;quot; 
&lt;p&gt;Scope=&amp;quot;Web&amp;quot; 
&lt;p&gt;Hidden=&amp;quot;FALSE&amp;quot; 
&lt;p&gt;DefaultResourceFile=&amp;quot;core&amp;quot; 
&lt;p&gt;xmlns=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;ElementManifests&amp;gt; 
&lt;p&gt;&amp;lt;ElementManifest Location=&amp;quot;ListTemplates\CustomDocumentLibrary.xml&amp;quot; /&amp;gt; 
&lt;p&gt;&amp;lt;/ElementManifests&amp;gt; 
&lt;p&gt;&amp;lt;/Feature&amp;gt; 
&lt;p&gt;Remember to replace &amp;lt;YOUR GUID HERE&amp;gt; with the GUID you created! 
&lt;p&gt;Save the file. 
&lt;p&gt;&lt;b&gt;Step 4: (Optional) Create the &amp;lt;DocumentTemplate&amp;gt; element inside the ONET.XML file if you are using a custom Document Template for your custom Document Library.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Open the ONET.XML file for a custom site definition you have created (Please see the &lt;a class="" href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/creating-a-custom-site-definition-in-wss-v3-moss.aspx" target="_blank"&gt;Creating a custom Site Definition in MOSS 2007 article&lt;/a&gt; for more details on how to create a custom site definition in MOSS 2007.) 
&lt;p&gt;Inside the ONET.XML file create a new &amp;lt;DocumentTemplate&amp;gt; element inside the &amp;lt;DocumentTemplates&amp;gt; element. 
&lt;p&gt;If you performed Step 2 use the following XML: 
&lt;p&gt;&amp;lt;DocumentTemplate 
&lt;p&gt;Path=“SAMPLE” 
&lt;p&gt;DisplayName=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibraryDisplayName;&amp;quot; 
&lt;p&gt;Type=&amp;quot;4000&amp;quot; 
&lt;p&gt;Default=&amp;quot;TRUE&amp;quot; 
&lt;p&gt;Description=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibraryDescription;&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;DocumentTemplateFiles&amp;gt; 
&lt;p&gt;&amp;lt;DocumentTemplateFile Name=&amp;quot;doctemp\word\custom.dot&amp;quot; 
&lt;p&gt;TargetName=&amp;quot;Forms/template.doc&amp;quot; 
&lt;p&gt;Default=&amp;quot;TRUE&amp;quot;/&amp;gt; 
&lt;p&gt;&amp;lt;/DocumentTemplateFiles&amp;gt; 
&lt;p&gt;&amp;lt;/DocumentTemplate&amp;gt; 
&lt;p&gt;If you did not perform Step 2 use the following XML: 
&lt;p&gt;&amp;lt;DocumentTemplate 
&lt;p&gt;Path=”SAMPLE” 
&lt;p&gt;DisplayName=&amp;quot;Custom Document Library&amp;quot; 
&lt;p&gt;Type=&amp;quot;4000&amp;quot; 
&lt;p&gt;Default=&amp;quot;TRUE&amp;quot; 
&lt;p&gt;Description=&amp;quot; Create a custom document library when you have a collection of documents or other files that you want to share. Custom document libraries support features such as folders, versioning, and check out.&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;DocumentTemplateFiles&amp;gt; 
&lt;p&gt;&amp;lt;DocumentTemplateFile Name=&amp;quot;doctemp\word\custom.dot&amp;quot; 
&lt;p&gt;TargetName=&amp;quot;Forms/template.doc&amp;quot; 
&lt;p&gt;Default=&amp;quot;TRUE&amp;quot;/&amp;gt; 
&lt;p&gt;&amp;lt;/DocumentTemplateFiles&amp;gt; 
&lt;p&gt;&amp;lt;/DocumentTemplate&amp;gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;Step 5: Create the ListTemplates sub directory under your new Feature directory.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;In the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CustomDocumentLibrary directory create a directory named ListTemplates. 
&lt;p&gt;&lt;b&gt;Step 6: Create the CustomDocumentLibrary.xml file for the Feature.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Create a file named CustomDocumentLibrary.xml and place it in the ListTemplates directory you just created. 
&lt;p&gt;If you performed Step 2 use the following XML: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.3820&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Elements xmlns=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;ListTemplate 
&lt;p&gt;Name=&amp;quot;doclib&amp;quot; 
&lt;p&gt;Type=&amp;quot;4000&amp;quot; 
&lt;p&gt;BaseType=&amp;quot;1&amp;quot; 
&lt;p&gt;OnQuickLaunch=&amp;quot;FALSE&amp;quot; 
&lt;p&gt;SecurityBits=&amp;quot;11&amp;quot; 
&lt;p&gt;DisplayName=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibraryDisplayName;&amp;quot; 
&lt;p&gt;Description=&amp;quot;$Resources:customDocumentLibrary,customDocumentLibrary_Folder;&amp;quot; 
&lt;p&gt;Image=&amp;quot;/_layouts/images/itdl.gif&amp;quot; 
&lt;p&gt;DocumentTemplate=&amp;quot;4000&amp;quot;/&amp;gt; 
&lt;p&gt;&amp;lt;/Elements&amp;gt; 
&lt;p&gt;If you did not perform Step 2 use the following XML: 
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt; 
&lt;p&gt;&amp;lt;!-- _lcid=&amp;quot;1033&amp;quot; _version=&amp;quot;12.0.3820&amp;quot; _dal=&amp;quot;1&amp;quot; --&amp;gt; 
&lt;p&gt;&amp;lt;!-- _LocalBinding --&amp;gt; 
&lt;p&gt;&amp;lt;Elements xmlns=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;&amp;gt; 
&lt;p&gt;&amp;lt;ListTemplate 
&lt;p&gt;Name=&amp;quot;doclib&amp;quot; 
&lt;p&gt;Type=&amp;quot;4000&amp;quot; 
&lt;p&gt;BaseType=&amp;quot;1&amp;quot; 
&lt;p&gt;OnQuickLaunch=&amp;quot;FALSE&amp;quot; 
&lt;p&gt;SecurityBits=&amp;quot;11&amp;quot; 
&lt;p&gt;DisplayName=&amp;quot;Custom Document Library&amp;quot; 
&lt;p&gt;Description=&amp;quot;Custom Document Library&amp;quot; 
&lt;p&gt;Image=&amp;quot;/_layouts/images/itdl.gif&amp;quot; 
&lt;p&gt;DocumentTemplate=&amp;quot;4000&amp;quot;/&amp;gt; 
&lt;p&gt;&amp;lt;/Elements&amp;gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; You can add multiple &amp;lt;ListTemplate&amp;gt; elements here if you wish to create a Feature that deploys multiple document libraries at a time. 
&lt;p&gt;&lt;b&gt;Step 7: Copy the contents of the DocLib sub directory into your new Feature directory.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;In the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CustomDocumentLibrary directory create a directory named DocLib. 
&lt;p&gt;Copy the contents of the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\DocLib directory to the new DocLib directory you just created. 
&lt;p&gt;&lt;b&gt;Step 8: (Optional) If you plan to use a custom Document Template and you performed Step 4 above, create a custom Document Template.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Open Microsoft Word. 
&lt;p&gt;Type in “Sample document template” into the document. 
&lt;p&gt;Click File | Save As 
&lt;p&gt;In the dropdown list that says Save as type: select Document Template (.dot) 
&lt;p&gt;Name the file custom.dot 
&lt;p&gt;Click the Save button. 
&lt;p&gt;&lt;b&gt;Step 9: (Optional) Copy the custom Word Document Template you create that will server as the default Document Template for your new custom Document Library to the SharePoint server.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Copy the custom.dot file to the following directory on the SharePoint server: 
&lt;p&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\&amp;lt;NAME OF CUSTOME SITE DEFINITION&amp;gt;\DOCTEMP\WORD 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;Step 10: (Optional) Add the Feature to the site definition you want the feature to be installed on by default when the site is created. (Please see the &lt;a class="" href="http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/adding-a-document-library-feature-to-a-site-definition-in-wss-v3-moss-2007.aspx" target="_blank"&gt;Adding a Document Library Feature to a Site Definition in WSS V3 / MOSS 2007 article&lt;/a&gt;.)&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;&lt;b&gt;Step 11: Register the Feature with a SharePoint site via the STSADM.EXE command line utility.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;On the SharePoint server type the following command on the command line to change to the directory stsadm.exe resides in: 
&lt;p&gt;cd “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN” 
&lt;p&gt;Then type the following command to install the feature on the SharePoint server: 
&lt;p&gt;stsadm -o installfeature -filename &amp;quot;CustomDocumentLibrary\feature.xml&amp;quot; 
&lt;p&gt;This example assumes you have created a SharePoint site at the following URL: 
&lt;p&gt;&lt;a href="http://sharepointservername/SiteDirectory/CustDocLib"&gt;http://SharePointServerName/SiteDirectory/CustDocLib&lt;/a&gt; 
&lt;p&gt;To activate the feature on the SharePoint site mentioned above site use the following command: 
&lt;p&gt;stsadm –o activatefeature –filename “CustomDocumentLibrary\feature.xml” –url “http://SharePointServerName/SiteDirectory/CustDocLib” 
&lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; You can also uninstall and deactivate features using the stsadm utility. 
&lt;p&gt;&lt;b&gt;Uninstall command line:&lt;/b&gt; stsadm -o uninstallfeature -filename &amp;quot;CustomDocumentLibrary\feature.xml&amp;quot; 
&lt;p&gt;&lt;b&gt;Deactivate command line:&lt;/b&gt; stsadm –o deactivatefeature –filename “CustomDocumentLibrary\feature.xml” –url “http://SharePointServerName/SiteDirectory/CustDocLib” 
&lt;p&gt;&lt;b&gt;Step 12: Reset IIS. &lt;/b&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;On the SharePoint server type iisreset on the command line and wait for IIS to reset. 
&lt;p&gt;&lt;b&gt;Step 13a: (Assuming you did not do Step 10) Browse to the SharePoint site you registered the feature with. Browse to the Create web page and the custom Document Library will be available in the list of items to create.&lt;/b&gt; 
&lt;p&gt;&lt;b&gt;&lt;/b&gt;
&lt;p&gt;Open Internet Explorer. 
&lt;p&gt;Browse to the &lt;a href="http://sharepointservername/SiteDirectory/CustDocLib"&gt;http://SharePointServerName/SiteDirectory/CustDocLib&lt;/a&gt; site. 
&lt;p&gt;Click Site Settings 
&lt;p&gt;Click Create 
&lt;p&gt;Click Custom Document Library 
&lt;p&gt;Fill in the required information and to the Custom Document Library. 
&lt;p&gt;(If you created a custom Document Template) In the Document Template dropdown select Custom Document Library for the template. 
&lt;p&gt;Click Create. 
&lt;p&gt;If you created a custom Document Template clicking the new button on the Custom Document Library toolbar will open the custom Document Template you created. 
&lt;p&gt;&lt;b&gt;Step 13b: (Assuming you did perform Step 10) Create a new SharePoint site with the site definition you edited in Step 10. Browse to the new site to see the custom Document Library already created for you.&lt;/b&gt; 
&lt;p&gt;Open Internet Explorer. 
&lt;p&gt;Create a new SharePoint site with the custom site definition you edited. 
&lt;p&gt;You will see the Custom Document Library already created for you and listed in the QuickLaunch Navigation on the left hand side of the site. 
&lt;p&gt;If you created a custom Document Template clicking the new button on the Custom Document Library toolbar will open the custom Document Template you created.&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=4386" width="1" height="1"&gt;</description><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Helpful+Code/default.aspx">Helpful Code</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/HOW+TO_3A00_+SharePoint/default.aspx">HOW TO: SharePoint</category><category domain="http://www.sharepointblogs.com/tbaginski/archive/tags/Custom+Development/default.aspx">Custom Development</category></item><item><title>Connected Page Viewer Web Part</title><link>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/connected-page-viewer-web-part.aspx</link><pubDate>Thu, 16 Aug 2007 20:11:00 GMT</pubDate><guid isPermaLink="false">1f6a1193-f4bb-4480-a5ae-b538d8b20f46:4383</guid><dc:creator>tbaginski</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.sharepointblogs.com/tbaginski/rsscomments.aspx?PostID=4383</wfw:commentRss><comments>http://www.sharepointblogs.com/tbaginski/archive/2007/08/16/connected-page-viewer-web-part.aspx#comments</comments><description>&lt;p&gt;This is a repost of an article on my blog that was lost during a server failure.&amp;nbsp; Historically, this&amp;nbsp;has been one of the most popular&amp;nbsp;articles on my blog, so I dug up the code and put it back online.&lt;/p&gt;
&lt;p&gt;The code you will find below is for a Connected Page Viewer Web Part for WSS V2 and SPS 2003.&amp;nbsp; The Connected Page Viewer Web Part consumes a URL from another Web Part that provides URLs.&amp;nbsp; This Web Part WORKS GREAT in WSS V3 and MOSS 2007 as well.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;using System;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Xml.Serialization;&lt;br /&gt;using System.Security;&lt;br /&gt;using System.Security.Permissions;&lt;br /&gt;using Microsoft.SharePoint;&lt;br /&gt;using Microsoft.SharePoint.Utilities;&lt;br /&gt;using Microsoft.SharePoint.WebPartPages;&lt;br /&gt;using Microsoft.SharePoint.WebPartPages.Communication;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.IO; 
&lt;p&gt;namespace Custom.SharePoint.WebParts&lt;br /&gt;{&lt;br /&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// This Web Part displays the contents of a URL that is passed in from a provider web part.&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;[DefaultProperty(&amp;quot;Text&amp;quot;),&lt;br /&gt;ToolboxData(&amp;quot;&amp;lt;{0}:ConsumerPageViewer runat=server&amp;gt;&amp;lt;/{0}:ConsumerPageViewer&amp;gt;&amp;quot;),&lt;br /&gt;XmlRoot(Namespace=&amp;quot;Custom.SharePoint.WebParts&amp;quot;)]&lt;br /&gt;public class ConsumerPageViewer : WebPart , ICellConsumer&lt;br /&gt;{&lt;br /&gt;#region Properties 
&lt;p&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// The URL to display in the IFRAME&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;private string pageUrl = string.Empty;&lt;br /&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// The property that exposes the pageUrl variable&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;[Browsable(true), &lt;br /&gt;Category(&amp;quot;Customization&amp;quot;), &lt;br /&gt;DefaultValue(&amp;quot;&amp;quot;), &lt;br /&gt;WebPartStorage(Storage.Personal), &lt;br /&gt;FriendlyName(&amp;quot;Page Url&amp;quot;), &lt;br /&gt;Description(&amp;quot;Default page URL such as &lt;a href="http://www.sharepointexperts.com%22)]/"&gt;http://www.sharepointexperts.com&amp;quot;)]&lt;/a&gt;&lt;br /&gt;public string 