Sunday, August 29, 2010

Paging Content Query Webpart

Hi Guys,

If you want to add the Paging option in Content Query webpart. Pls have a look(http://blog.mastykarz.nl/paging-content-query-web-part/).

The following steps you need to do:

1.Download the .wsp file
2.Put the file in ..12/bin/
3.Run this command "stsadm -o addsolution -filename ExtendedCQWP.wsp
4.Goto Central Admin->Operations->Solution Management
5.Deploy the ExtendedCQWP.wsp file(Specify the Web application)
6.Goto your sharepoint Site Settigs->Site Collection Feature->Actiavate the Extended Content Query webpart.
7.Now the ExtendedCQWP & ExtendedCQWP Pager webpart is added in webart gallery.
8.Just add the webparts(Both ECQWP & Pager) in your page where you need.
9.Connect the webparts (Click the connections(next to modify shared webpart)).
10 .In Extended CQWP ->Modify shared webpart -> Data view->Query string variable (Type "page")
11. In "items per page" give the value more than 0(zero).
12.Publish the page.
13.At first time just append "?page=1" in url then only it will work.

Ask me , if you have any queries.

4 comments:

  1. Awesome, This is what I've been looking for

    ReplyDelete
  2. ok...very nice but u will send some more real time examples

    ReplyDelete
  3. Hi,
    When I add the ExtendedQCWP it gives error. "An error occurred while attempting to add the item to the page."

    And when i tried to add the ExtendedQCWP Pager webpart it gives error.
    "Security Exception

    Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

    Exception Details: System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.]
    Imtech.SharePoint.WebParts.ExtendedContentQueryWebPartPager.RenderContents(HtmlTextWriter writer) +0
    System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +42
    Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) +43"

    ReplyDelete