Microsoft MVP Logo

    <p>In <a href="http://www.andrewconnell.com/blog/Announcing-ACs-VS-CodeRushRefactor-Tools-for-SharePoint-Devs-Part-1-of-5">Part 1</a> of this series on these little tools I created for SharePoint developers I gave a bit of an overview of what they are all about and where you can get additional information. <a href="http://www.andrewconnell.com/blog/Working-with-Templates-in-ACs-VS-CodeRushRefactor-Tools-for-SharePoint-Devs-Part-2-of-5">Part 2</a> discussed CodeRush (CR) templates and showed how they are used. In this post I want to spend some time talking about some special templates for developers creating publishing sites.</p>
    <p><a href="http://www.andrewconnell.com/blog/Moving-layout-files-master-pages-page-layouts-CSS-etc-in-a-MOSS-Publishing-site-between-multiple-environments">A few months ago I put a post up about creating uncustomized instances of files that are stored in Features on the file system</a>. It is also the subject of my chapter in the <a href="http://www.amazon.com/dp/0470168358?tag=andrewconnell-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=0470168358&amp;adid=18XR7SHQRHRC18QJJYX6&amp;">Real World SharePoint 200</a>7 book recently published (<a href="http://www.andrewconnell.com/blog/Excerpt-of-my-chapter-in-the-quotReal-World-SharePointquot-book-available">read an excerpt here</a>). This is a common approach developers like to take when building SharePoint sites. But there's a problem: it's tedious building those dang element manifest files with all the &lt;module /&gt; nodes provisioning master pages, page layouts, preview images, CSS, images... all that stuff.</p>
    <p>In an effort to help my fellow Publishing site developer brothers and sisters, I created a few templates just for you (well, for me too). </p>
    <p>What's the first think we do? Create content types for page layouts right? But those have to be derived from the Page content type... and that's got a nasty content type ID you have to copy-paste from the <strong>PublishingResources</strong> content type: <strong>0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E2
    19954237AF3900242457EFB8B24247815D688C526CD44D. </strong>Ugh... we have to type that every time? Nope... no more! Introducing the elements content type for publishing pages [<strong>ectpp</strong>] template. It creates a new content type definition, but automatically adds the Page content type for you as well as an optional unique ID to the end:</p>
    <p align="center"><a title="Photo Sharing" href="http://www.flickr.com/photos/andrewconnell/1203602372/"><img style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" height="132" alt="ectpp" width="552" src="http://farm2.static.flickr.com/1200/1203602372_6510eefde0_o.gif"></a></p>
    <p>OK, next step: provisioning master pages. Ah, we can make this easier right? You're creating a element module for master page [<strong>emmp</strong>] right? Well, the template fills in a lot of the stock stuff for you... check it out:</p>
    <p align="center"><a title="Photo Sharing" href="http://www.flickr.com/photos/andrewconnell/1203602270/"><img style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" height="189" alt="emmp" width="552" src="http://farm2.static.flickr.com/1216/1203602270_108512fb9c_o.gif"></a></p>
    <p>And what about adding files to the master page file set? Well, that's just an element module master page file [<strong>emmpf</strong>]:</p>
    <p align="center"><a title="Photo Sharing" href="http://www.flickr.com/photos/andrewconnell/1203601798/"><img style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" height="347" alt="emmpf" width="552" src="http://farm2.static.flickr.com/1277/1203601798_7a8a31f764_o.gif"></a></p>
    <p>You like? Guess what, there are templates for page layouts too [<strong>empl</strong> &amp; <strong>emplf</strong>] and preview images [<strong>empi</strong>]. OK, I hear you in the back of the room... you have branding and layout files you need to stick in the Style Library right? No problem, the element module style library [<strong>emsl</strong>] is there for you too.</p>
    <p>Hold on... don't you have to create site columns that are of type Publishing HTML? OK, got a special one for you: element site column, type HTML [<strong>eschtml</strong>].</p>
    <p>I hope you get some value in these... they've helped me quite a bit over the last few months. As always, if you've got others, send them my way!</p>
    <p>To get more information on the tools including documentation, links to detailed screencasts / demonstrations, and a history, check out the main page:</p>
    <p>&raquo; <a href="http://www.andrewconnell.com/ACs-VS-CodeRush-Refactor-Tools-for-SharePoint-Developers">AC's VS CodeRush/Refactor Tools for SharePoint Developers</a></p>
    <p>Let me know what you think! Oh... and I didn't name this post "part 1 of 5" for some random reason. Over the next four days, I'll add another post related to these productivity enhancements.  :)</p>
    <ul>
    <li><a href="http://www.andrewconnell.com/blog/Announcing-ACs-VS-CodeRushRefactor-Tools-for-SharePoint-Devs-Part-1-of-5">Part 1: Announcing AC's VS CodeRush/Refactor Tools for SharePoint Devs </a></li>
    <li><a href="http://www.andrewconnell.com/blog/Working-with-Templates-in-ACs-VS-CodeRushRefactor-Tools-for-SharePoint-Devs-Part-2-of-5">Part 2: Working with Templates in AC's VS CodeRush/Refactor Tools for SharePoint Devs</a> </li>
    <li><a href="http://www.andrewconnell.com/blog/MOSS-Publishing-Templates-in-ACs-VS-CodeRushRefactor-Tools-for-SharePoint-Part-3-of-5">Part 3: Special Templates in AC's VS CodeRush/Refactor Tools for SharePoint Devs for Publishing Sites </a></li>
    <li><a href="http://www.andrewconnell.com/blog/Use-of-StringProviders-in-ACs-VS-CodeRushRefactor-Tools-for-SharePoint-Devs-Part-4-of-5">Part 4: String Providers in AC's VS CodeRush/Refactor Tools for SharePoint Devs </a></li>
    <li><a href="http://www.andrewconnell.com/blog/Creating-custom-Refactorings-for-use-in-Refactor-Pro-The-quotCreate-Web-Part-Definitionquot-Refactoring-Part-5-of-5">Part 5: Creating custom Refactorings for use in Refactor! Pro: The "Create Web Part Definition" Refactoring</a> </li>
    </ul>
    <div class="wlWriterEditableSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:367f05fa-6af9-45fc-9b26-1e37cdf908f5" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px">Technorati tags: <a rel="tag" href="http://technorati.com/tags/sharepoint">sharepoint</a>, <a rel="tag" href="http://technorati.com/tags/wss">wss</a>, <a rel="tag" href="http://technorati.com/tags/moss">moss</a>, <a rel="tag" href="http://technorati.com/tags/publishing%20site">publishing site</a>, <a rel="tag" href="http://technorati.com/tags/dxcore">dxcore</a>, <a rel="tag" href="http://technorati.com/tags/coderush">coderush</a>, <a rel="tag" href="http://technorati.com/tags/refactor%20pro">refactor pro</a></div>
Comments powered by Disqus