Once in a while you need to paste one of these long strings into your C\# code. I've set recently a record by pasting an exported SharePoint 2007 RSS Viewer Web Part: more than 400 lines! If it's only once during the solution development it's doable: you could get it well formatted using some Search and Replace with Regular Expressions. But what if you have to paste a dozen of such strings in your code?
Using CSS files is the recommended way for incorporating the chrome in a SharePoint WCM solution. Among the various definitions of the layout pieces there are also images' references. Each such reference can be defined using an absolute of relative URL. As long as you use images in the same directory as the CSS file there is no problem at all: you can manage all the paths easily by simply using one of the URL kinds. Unfortunately a problem occurs when you would like to use images from other directories for example the PublishingImages folder. They should be referenced via relative URLs. Using absolute URLs results in problems when a Site Collection doesn't reside in the root or /sites directory. Also sharing a CSS file among different Site Collections isn't possible while using PublishingImages folder: there is no simple way to make the images' paths be defined dynamically based on the Site Collection calling the CSS file.
In his recent post Robert J Wheeler has presented his way of dealing with building CAML queries dynamically. Here at Imtech ICT Business Solutions we use a slightly different approach.
Some of our customers like to have the information displayed in a different way than the order of the fields within the Content Types: there is frankly a difference of the information meaning for their customers (visitors) and the Information Workers within the organization. As SharePoint 2007 ships with the in-place edit possibility it’s quite obvious that this is the recommended way to use for managing the data – especially when it comes to Information Workers who not necessarily have to have technical background. Implementing the required fields in the Page Layout seems to be the solution for this problem: both IW and visitors have the idea of the page will look after publishing.
AddToEnvPath is a tiny tool which I wrote to help me add some path to the Environment Path variable. Like this you gain easy access to tools like STSADM.EXE and GACUTIL.EXE no matter the command line location.