<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Microsoft Enterprise Content Management (ECM) Team Blog : Page Layouts</title><link>http://blogs.msdn.com/ecm/archive/tags/Page+Layouts/default.aspx</link><description>Tags: Page Layouts</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Publishing Sites: Field Controls or Web Parts... That is the Question!</title><link>http://blogs.msdn.com/ecm/archive/2008/10/09/publishing-sites-field-controls-or-web-parts-that-is-the-question.aspx</link><pubDate>Thu, 09 Oct 2008 07:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8992465</guid><dc:creator>ecmblog</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/ecm/comments/8992465.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ecm/commentrss.aspx?PostID=8992465</wfw:commentRss><wfw:comment>http://blogs.msdn.com/ecm/rsscomments.aspx?PostID=8992465</wfw:comment><description>&lt;P&gt;There isn't a week that goes by where I don't get an email asking me this very question.&amp;nbsp; More often than not, its because someone has been using the Content Editor Web Part (CEWP) when they should have been using the Publishing HTML field type.&amp;nbsp; This mistake typically goes unnoticed until a customer needs to roll back to a previous version of a page or when they run a content deployment job.&amp;nbsp; So what goes wrong?&amp;nbsp; Well, the CEWP doesn't store version history, it doesn't participate in any publishing approval workflow&amp;nbsp;and it does store absolute URLs rather than relative URLs.&amp;nbsp; The first problem means you'll have to go to site backups to get access to previous versions of content, the second problem means that users will see updates to the content in the CEWP even if an editor&amp;nbsp;hasn't approved the&amp;nbsp;page for publishing and the third problem means that all your hyperlinks will resolve to the wrong address (e.g.&amp;nbsp;http://staging.adventure-works.com/ vs http://www.adventure-works.com/).&lt;/P&gt;
&lt;P&gt;Thankfully, all of these problems can be avoided by using the Publishing HTML field type.&amp;nbsp; I've talked at length with Andrew Connell (MVP) about this and I know it's something he is passionate about so I asked him to write up a guest post to explore the topic.&lt;/P&gt;
&lt;P&gt;Ryan Duguid&lt;BR&gt;Technical Product Manager&lt;BR&gt;Microsoft Corp&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6.8pt 0in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: 'Trebuchet MS','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;STRONG&gt;&lt;FONT size=3&gt;Andrew Connell on Field Controls and Web Parts&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6.8pt 0in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: 'Trebuchet MS','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;/P&gt;
&lt;P&gt;One of the most common problems I see with people developing Publishing sites stems from the lack of understanding in the core differences between Web Parts &amp;amp; Field Controls&amp;nbsp;and when to use them. Many a consultant have dug a deep hole in this area. My goal in this post is to make you aware of the differences to make educated decisions when selecting one over the other.&lt;/P&gt;
&lt;P&gt;&lt;I&gt;What follows is a discussion with respect to MOSS 2007 Publishing sites (aka: WCM sites), but all the concepts apply to any Windows SharePoint Services 3.0 based site.&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;When creating editable content regions on a page layout, enabling content owners to add and manage their own content, developers/designers are presented with two options: field controls or Web Parts. These two options are very different and Publishing site developers should be aware of the differences. The fundamental difference comes down to where the data is stored.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=3&gt;Web Parts&lt;BR&gt;&lt;/FONT&gt;&lt;/B&gt;Web Parts come straight from ASP.NET and their data is stored in a personalization store. Microsoft was nice and baked the personalization store into the site collection's content database. Data in a Web Part is stored within the context of the PAGE (i.e.: URL) &amp;amp; the user (which could be the shared user or a specific person). This does allow the content in Web Parts to be uniquely personalized by authenticated users.&lt;/P&gt;
&lt;P&gt;In addition, developers and designers can only create Web Part Zones on the page layout. Content owners can then put any Web Part in the zones and any content within them.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=3&gt;Field Controls&lt;BR&gt;&lt;/FONT&gt;&lt;/B&gt;Field Controls are much different from Web Parts. They are more like windows into list items. A field control pulls data (in display mode) from a particular column in a list item and writes back to that column in edit mode. Pages in a Publishing site are stored as items in a list; the Pages list. Because they are in a list, they can leverage all the benefits a list has to provide, but visioning &amp;amp;&amp;nbsp;history is the most important here. Just keep one thing in mind: field controls are simply gateways, or windows, to the data.&lt;/P&gt;
&lt;P&gt;When a developer places a field control on a page layout, they have the ultimate control of where it is placed on the page and any rules such as if the content owners can insert tables or images into the content. The content owners can only work within the rules defined by the developers.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=3&gt;What is the significance?&lt;BR&gt;&lt;/FONT&gt;&lt;/B&gt;Great question! From my experience, MOST customers (90%+) who are rolling out a Publishing site, or Web-based content management systems such as MOSS 2007 WCM, are doing so because the following aspects are important to the project:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Consistent lookand feel (aka: a corporate brand)&lt;/LI&gt;
&lt;LI&gt;Empower content owners &amp;amp; subject matter experts (SME) to maintain the content&lt;/LI&gt;
&lt;LI&gt;Free up IT staff from updating content submitted by SMEs&lt;/LI&gt;
&lt;LI&gt;Structured organization of contentand a versioned and/or historical record of the content&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The challenge here is that Web Parts pose a problem with this approach. Because their data is stored in the ASP.NET personalization store in the context of the page (it's URL mind you) &amp;amp; the user. However with field controls, the data is saved with the page's list item. This means that when the page is updated, a new version is created and the old data is retained with the page.&lt;/P&gt;
&lt;P&gt;Another challenge is with URLs in the content... especially relative URLs. Take the Publishing HTML field type &amp;amp; the Content Editor Web Part (CEWP). The CEWP does not store relative URLs... it stores only absolute URLs. Even if you enter a relative URL into the editor, it will be converted to an absolute URL. The rich text editor that the Publishing HTML field type is tied to does not convert relative URLs to absolute URLs.&lt;/P&gt;
&lt;P&gt;If structure and history is important on your site, you should ONLY consider field controls for your content. If you want to have a more relaxed authoring environment where structure &amp;amp; history isn't important, Web Parts are better. What if structure &amp;amp; history is important... does it ever make sense to use Web Parts? Sure! Use them for providing functionality like stock quotes, consuming news feeds, or rolling up content (as in the Content Query Web Part). In this scenario, the only data that's stored is configuration data... not true content.&lt;/P&gt;
&lt;P&gt;To summarize: &lt;B&gt;the content in Web Parts is not versioned and there is no history&lt;/B&gt;, but &lt;B&gt;the content in field controls is versioned &amp;amp; a history is retained&lt;/B&gt; (provided the Pages library has versioning enabled, which it does by default).&lt;/P&gt;
&lt;P&gt;-AC&lt;/P&gt;
&lt;P&gt;Andrew Connell&lt;BR&gt;MVP Office SharePoint Server&lt;BR&gt;&lt;A href="http://www.andrewconnell.com/blog" mce_href="http://www.andrewconnell.com/blog"&gt;www.andrewconnell.com/blog&lt;/A&gt;&lt;BR&gt;Sr. SharePoint Instructor - Ted Pattison Group&lt;BR&gt;&lt;A href="http://www.tedpattison.net/" mce_href="http://www.tedpattison.net/"&gt;http://www.tedpattison.net/&lt;/A&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8992465" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ecm/archive/tags/Web+Content+Management/default.aspx">Web Content Management</category><category domain="http://blogs.msdn.com/ecm/archive/tags/branding/default.aspx">branding</category><category domain="http://blogs.msdn.com/ecm/archive/tags/Page+Layouts/default.aspx">Page Layouts</category><category domain="http://blogs.msdn.com/ecm/archive/tags/Content+Deployment/default.aspx">Content Deployment</category><category domain="http://blogs.msdn.com/ecm/archive/tags/WCM/default.aspx">WCM</category><category domain="http://blogs.msdn.com/ecm/archive/tags/Content+Editor+Web+Part/default.aspx">Content Editor Web Part</category><category domain="http://blogs.msdn.com/ecm/archive/tags/CEWP/default.aspx">CEWP</category><category domain="http://blogs.msdn.com/ecm/archive/tags/Publishing+HTML+field+type/default.aspx">Publishing HTML field type</category></item><item><title>Building tylerbutler.com, Part 2: Building Content Types and Page Layouts</title><link>http://blogs.msdn.com/ecm/archive/2006/11/06/building-tylerbutler-com-part-2-building-content-types-and-page-layouts.aspx</link><pubDate>Mon, 06 Nov 2006 22:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1003391</guid><dc:creator>ecmblog</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.msdn.com/ecm/comments/1003391.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ecm/commentrss.aspx?PostID=1003391</wfw:commentRss><wfw:comment>http://blogs.msdn.com/ecm/rsscomments.aspx?PostID=1003391</wfw:comment><description>&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/10/30/building-tylerbutler-com-part-1-planning-and-basic-branding.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/10/30/building-tylerbutler-com-part-1-planning-and-basic-branding.aspx"&gt;&lt;FONT color=#0000cc&gt;Part 1&lt;/FONT&gt;&lt;/A&gt; :: &lt;FONT color=#0000cc&gt;Part 2&lt;/FONT&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/11/16/building-tylerbutler-com-part-3-customizing-content-query-styles.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/11/16/building-tylerbutler-com-part-3-customizing-content-query-styles.aspx"&gt;Part 3&lt;/A&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/12/11/building-tylerbutler-com-part-4-the-main-home-page-and-migrating-content.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/12/11/building-tylerbutler-com-part-4-the-main-home-page-and-migrating-content.aspx"&gt;Part 4&lt;/A&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/12/18/building-tylerbutler-com-part-5-final-touches.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/12/18/building-tylerbutler-com-part-5-final-touches.aspx"&gt;Part 5&lt;/A&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2007/01/16/building-tylerbutler-com-part-6-what-was-tough-and-what-s-to-come.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2007/01/16/building-tylerbutler-com-part-6-what-was-tough-and-what-s-to-come.aspx"&gt;Part 6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This is part 2 of an ongoing series of posts about my experience building a custom site on top of Office SharePoint Server 2007. If you haven't yet read &lt;A href="http://blogs.msdn.com/ecm/archive/2006/10/30/building-tylerbutler-com-part-1-planning-and-basic-branding.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/10/30/building-tylerbutler-com-part-1-planning-and-basic-branding.aspx"&gt;part 1&lt;/A&gt;, I'd strongly suggest reading it first. &lt;/P&gt;
&lt;P&gt;In my last post, I discussed planning and building out my site structure, as well as customizing my master page. In this post, I'll cover creating page layouts and their backing content types, and customizing the Content Query (CQWP) web part to roll up individual posts into a summary page. &lt;/P&gt;
&lt;H3&gt;Creating Content Types &lt;/H3&gt;
&lt;P&gt;The first thing I needed to do before I could go about creating my custom page layouts was create a content type. Because I wanted it to be used by pages in my site, I used the &lt;STRONG&gt;Page&lt;/STRONG&gt; content type as the parent for my custom content type, which I called &lt;STRONG&gt;TBPost&lt;/STRONG&gt;. I then added a few custom fields to my content type, with the following column types: &lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE class="" style="BORDER-COLLAPSE: collapse" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 319px"&gt;
&lt;COL style="WIDTH: 319px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: black 0.5pt solid; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;&lt;STRONG&gt;Column Name&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: black 0.5pt solid; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;&lt;STRONG&gt;Column Type&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Post Author&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Person or Group&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Page Content&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Publishing HTML&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Post Time&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Date and Time&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Featured Post&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Choice&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Post Category&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;
&lt;P&gt;Lookup&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P&gt;Most of these custom columns are straightforward, with the exception of the "Featured Post" and "Post Category" fields. &lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;Featured Post&lt;/STRONG&gt; field is used to determine whether a given post is featured on my site. In practice, posts that are featured get displayed at the top of the rollup pages and have a slightly different style applied to them. I have three options for this field: Not Featured, Section Only, and Front Page. By setting this field on a given page, I can make it display at the top of either the front page of the site, or only on the rollup page for a specific section. If a post is set to be featured on the front page, it's implicitly meant to be featured within the section as well. I'll explain how I do this a bit later. &lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;Post Category&lt;/STRONG&gt; field is a lookup field to a custom list that I created that contains all the categories that a post can be in. You may be wondering why I use a lookup field in this case, instead of just a choice field, like I did for the Featured Post field. Well, a given category has an image associated with it, and by using a custom list to store the categories, I can associate an image with each category as an additional column in the list. In the end, I have not been able to leverage this in the way I initially planned, but with this design I do have capability to associate additional data with a category and look it up using code if I need to. &lt;/P&gt;
&lt;P&gt;I should also note that both the custom columns and content type I created are in the root site. This is so that the entire site hierarchy can use them, and so that the Content Query web parts can filter on them. But both content types and columns can be scoped to a subweb. &lt;/P&gt;
&lt;H3&gt;Building Page Layouts &lt;/H3&gt;
&lt;P&gt;With my new content type created, I set about building my page layouts. I started with the &lt;STRONG&gt;Post&lt;/STRONG&gt; layout, which is used by every individual post in the site. Whenever I want to post something new, I simply create a new Page in the appropriate subweb using the Post page layout. &lt;/P&gt;
&lt;P&gt;To build the layout, I followed pretty much the same steps that I did when building my master page: I opened up a page on my old site and copied the HTML source for the main post body into the &lt;CODE&gt;&lt;STRONG&gt;PlaceHolderMain&lt;/STRONG&gt;&lt;/CODE&gt; content placeholder in my page layout in SharePoint Designer. Then I removed the content of the post, and dragged in field controls from the handy SharePoint Designer toolbox. Here's what the page layout looks like in SharePoint Designer: &lt;/P&gt;
&lt;CENTER&gt;&lt;A class="" href="http://blogs.msdn.com/photos/ecmblog/images/1007652/original.aspx" mce_href="http://blogs.msdn.com/photos/ecmblog/images/1007652/original.aspx"&gt;&lt;IMG style="WIDTH: 640px; HEIGHT: 460px" height=460 src="http://blogs.msdn.com/photos/ecmblog/images/1007652/640x460.aspx" width=640 mce_src="http://blogs.msdn.com/photos/ecmblog/images/1007652/640x460.aspx"&gt;&lt;/A&gt;&lt;/CENTER&gt;
&lt;CENTER&gt;&lt;STRONG&gt;&lt;EM&gt;The Post page layout in SharePoint Designer&lt;/EM&gt;&lt;/STRONG&gt;&lt;/CENTER&gt;
&lt;P&gt;This whole process was very easy, because SharePoint Designer automatically loads the appropriate fields and controls into the toolbox based on content type that I associated with the page layout when I created it. It really is as easy as dragging and dropping these fields into the right spot on the layout. One other thing I did was add an &lt;STRONG&gt;Edit Mode Panel&lt;/STRONG&gt; to the top of the layout. This nifty little thing only displays its contents when the page is brought into edit mode, so it's perfect for controls that you want only your authors to see or edit. In my case, I put the Featured Post and Post Category field controls there. You can find the Edit Mode Panel in the toolbox, under &lt;STRONG&gt;SharePoint Controls -&amp;gt; Server Controls&lt;/STRONG&gt;. &lt;/P&gt;
&lt;P&gt;The trickiest problem I ran into was how to display the category image for a post. It couldn't be hard coded into the layout, because then I'd need a separate layout for every category, which would be a pain to maintain later. I could also have used an image field control, but then every time I created a new post I would have to select the image. I wanted it to be done automatically based on the category I selected. &lt;/P&gt;
&lt;P&gt;My initial plan was to create a custom field control or web part that would render out the right image based on the category I'd selected on the page. However, I really wanted to avoid writing code, so I made a compromising solution. Every site in MOSS has an associated site image. This image is what's displayed in the top left-hand corner of the site when you're using default.master. I changed this for each of my subwebs by going to &lt;STRONG&gt;Site Settings -&amp;gt; Title, description, and icon&lt;/STRONG&gt;. Then, in my page layout, I used some markup from default.master to insert that site image into the layout: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;STRONG&gt;&amp;lt;SharePointWebControls:splinkbutton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitle"&amp;gt;&lt;/STRONG&gt;
&lt;STRONG&gt;	&amp;lt;SharePointWebControls:sitelogoimage id="onetidHeadbnnr0" runat="server"/&amp;gt;&lt;/STRONG&gt;
&lt;STRONG&gt;&amp;lt;/SharePointWebControls:SPLinkButton&amp;gt; &lt;/STRONG&gt;&lt;/CODE&gt;
&lt;/PRE&gt;
&lt;P&gt;As you can see, the &lt;CODE&gt;&lt;STRONG&gt;sitelogoimage&lt;/STRONG&gt;&lt;/CODE&gt; control is wrapped in a &lt;CODE&gt;&lt;STRONG&gt;splinkbutton&lt;/STRONG&gt;&lt;/CODE&gt; control that points to the subweb, not the site collection. This means that if I click the category image for a given post, I am taken to the subweb that that page is in, which essentially takes me to the rollup page for that category. This is the exact functionality I had on my old site. This solution is pretty elegant, and prevents me from having to use different page layouts on different sites or pick images manually for every post. It's not ideal, however, for reasons I'll point out a bit later. &lt;/P&gt;
&lt;H3&gt;Rollup Layouts &lt;/H3&gt;
&lt;P&gt;Now that I had a layout for my individual posts, I wanted to make some layouts for my rollup pages that would aggregate all the pages in various categories, and across the whole site. I started with the individual site rollup page layout, since most of the rollup pages in the site would use this layout. My main home page would be slightly different, but I'll get to that in a minute. &lt;/P&gt;
&lt;P&gt;I knew that I wanted to use Content Query web parts for rolling up the pages, so I put a web part zone in the center of my layout and added the web parts to the zone there. I added two web parts. The first CQWP was configured to roll up only pages that were featured on either the home page or the section (using the Featured Post field I mentioned earlier). I did this by configuring the part to look for Pages under the root site that had the content type &lt;STRONG&gt;TBPost&lt;/STRONG&gt;. I also used the &lt;STRONG&gt;Filter properties&lt;/STRONG&gt;, telling it to exclude pages that &lt;EM&gt;did&lt;/EM&gt; &lt;EM&gt;not&lt;/EM&gt; have their Featured Post property equal to &lt;STRONG&gt;"Front Page" &lt;/STRONG&gt;or&lt;STRONG&gt; "Section Only."&lt;/STRONG&gt; I also wanted to be sure that my rollup pages were excluded from the CQWP, so I set it to filter out pages whose category was &lt;STRONG&gt;"Rollup."&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;The second CQWP was configured to roll up all pages across the subweb, i.e. all pages in a given category. To accomplish this, I filtered the results only on the Rollup field and I &lt;EM&gt;excluded&lt;/EM&gt; pages that had their Featured Post property equal to "Front Page" or "Section Only." This means that if a post is featured, it only shows up in &lt;EM&gt;one&lt;/EM&gt; of the CQWPs. I also turned on the RSS feed for this second web part, but I'll discuss RSS at greater length later. Finally, I configured both web parts to only return 5 items apiece. &lt;/P&gt;
&lt;P&gt;The other thing I needed to do was tell the CQWP to go and grab some of my extra fields. By default, the CQWP does not return all of the fields for a given page. However, you can override this behavior by setting the &lt;CODE&gt;&lt;STRONG&gt;CommonViewFields&lt;/STRONG&gt;&lt;/CODE&gt; property. There is more information on doing this in &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx"&gt;George's post on the CQWP&lt;/A&gt;. In my case, I set the property as follows: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;STRONG&gt;CommonViewFields="Title,Text;Comments,Text;PostAuthor,User;PostCategory1,Lookup;Post_x0020_Time;" &lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also didn't want to have to use the annoying name &lt;CODE&gt;&lt;STRONG&gt;Post_x0020_Time&lt;/STRONG&gt;&lt;/CODE&gt; in my XSL, so I used the &lt;CODE&gt;&lt;STRONG&gt;DataColumnRenames&lt;/STRONG&gt;&lt;/CODE&gt; property to tell the CQWP to remap that field name to another name in my XSL: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;STRONG&gt;DataColumnRenames="Post_x0020_Time,PostDate;" &lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;At this point, my CQWP's were configured to grab the right data, but of course they didn't render the content quite like I wanted them to. In order to get things looking right, I had to edit the XSLT that was being applied to the items, thus changing how they got rendered out. I'll tackle that particular task in my next post. Until next time...&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/10/30/building-tylerbutler-com-part-1-planning-and-basic-branding.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/10/30/building-tylerbutler-com-part-1-planning-and-basic-branding.aspx"&gt;&lt;FONT color=#0000cc&gt;Part 1&lt;/FONT&gt;&lt;/A&gt; :: &lt;FONT color=#0000cc&gt;Part 2&lt;/FONT&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/11/16/building-tylerbutler-com-part-3-customizing-content-query-styles.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/11/16/building-tylerbutler-com-part-3-customizing-content-query-styles.aspx"&gt;Part 3&lt;/A&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/12/11/building-tylerbutler-com-part-4-the-main-home-page-and-migrating-content.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/12/11/building-tylerbutler-com-part-4-the-main-home-page-and-migrating-content.aspx"&gt;Part 4&lt;/A&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2006/12/18/building-tylerbutler-com-part-5-final-touches.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2006/12/18/building-tylerbutler-com-part-5-final-touches.aspx"&gt;Part 5&lt;/A&gt; :: &lt;A class="" href="http://blogs.msdn.com/ecm/archive/2007/01/16/building-tylerbutler-com-part-6-what-was-tough-and-what-s-to-come.aspx" mce_href="http://blogs.msdn.com/ecm/archive/2007/01/16/building-tylerbutler-com-part-6-what-was-tough-and-what-s-to-come.aspx"&gt;Part 6&lt;/A&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1003391" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ecm/archive/tags/Web+Content+Management/default.aspx">Web Content Management</category><category domain="http://blogs.msdn.com/ecm/archive/tags/branding/default.aspx">branding</category><category domain="http://blogs.msdn.com/ecm/archive/tags/design/default.aspx">design</category><category domain="http://blogs.msdn.com/ecm/archive/tags/tylerbutler.com/default.aspx">tylerbutler.com</category><category domain="http://blogs.msdn.com/ecm/archive/tags/Content+Types/default.aspx">Content Types</category><category domain="http://blogs.msdn.com/ecm/archive/tags/Page+Layouts/default.aspx">Page Layouts</category></item></channel></rss>