Add the icon (DocIcon) of the file-type to a custom xsl-template when using the ContentByQueryWebPart (CQWP)

Posted by Eric Bartels

In one of my current projects it was required to show the recent documents inside the site collection along with its associated icon. Of course our friend the ContentByQueryWebPart (CQWP) comes in.But how do I get the icon of the document? The result Don’t do it again One could start to use a long list [...]

Problems with the ContentByQueryWebPart (CQWP) and its ItemXslLink-property

Posted by Eric Bartels

If you ever tried to set the ItemXslLink (which is a normal property of the ContentByQueryWebPart) you will see that sometimes this simply doesn’t work. You get an exception! Object reference not set to an instance of an object Why? The CmsDataFormWebpart.MakeSiteRelativeUrl (which is called somewhere when setting this property) needs the HttpContext.Current which isn’t [...]