Tuesday, September 21, 2010

Apply Filter on Category Field in Content Query Webpart which displays Posts

Recently I came across an issue on applying filter on a content query webpart(CQWP) which was configured to show list items from Posts list. The filter which needs to be applied was against the Category column of the post so that the webpart shows on posts of that category.

So I choose,

image but when I click Apply button, the webpart threw an error.

image

To solve this error, and to apply the filter properly we need to add an additional filter property on the .webpart file. Export the webpart to hard disk, open the .webpart file in any text editing tool, find the property tag with name “AdditionalFilterFields

image

Replace that with

image

Actually we need to add additional filter field PostCategory, which is the internal column name of the category field of posts.

Now save the .webpart file and import this to the webpart page, after this if we go to the modify webpart, and in the additional filter column we will find the PostCategory displayed,

image

Choose that PostCategory, and apply the filter logic,

image Click OK or Apply button to make the changes.

That’s it, now the CQWP will show the posts where category contains Category 1,

image

Thursday, September 16, 2010

Very useful and easy tool to take screen snap shots

Hi All, I found it very useful and easy to use Screen Clipper http://www.screenclipper.com/ to get the screen snap shots. This is free application.

Technorati Tags: ,