zaterdag 15 oktober 2011

HowTo: Getting the Content By Query WebPart to work in Office 365 P1

The Content By Query WebPart (CBQWP) is only available when the publishing features are activated. A feature not available in the P1 of Office 365. But, with a little (probably) not supported hackerdy-hack, you can get it to work.

Step 1; Making the webpart available in the webpart gallery

Because we can’t use the publishing feature which makes the webpart available in the webpart gallery, we have to add it manually;

  1. Navigate to the Site Settings of your portal by entering the following url http://xxxxxxxx.sharepoint.com/_layouts/settings.aspx
  2. Navigate to the webpart gallery
  3. Hit the new document link in the ribbon. The dialog framework pops up with a list of webparts you want to add. Select the Content By Query WebPart

image

Step 2; Making the required files available

The CBQWP needs three files in the Style Library; ContentQueryMain.xsl, Header.xsl and ItemStyle.xsl. These files needs to be available in a folder called ‘XSL Style Sheets’. But here’s the kicker, you can’t add folders in this list through the UI;

2.1; Add the ‘XSL Style Sheets’ folder

  1. Navigate to the Style Library by entering the following url http://xxxxxxxx.sharepoint.com/Style Library
  2. Replace AllItems.aspx in the Url with the ‘Upload.aspx?RootFolder=%2FStyle%20Library&Type=1’. This will take you to Upload.aspx whith Type=1 which will render the form to make folder creation possible
  3. Enter ‘XSL Style Sheets’ and hit OK

2.2; Upload the required files to the XSL Style Sheets folder2.2; Upload the required files to the XSL Style Sheets folder

Now upload ContentQueryMain.xsl, Header.xsl and ItemStyle.xsl to this folder. Unfortunately i can’t deploy the required files here because they are property of Microsoft…. but I’m sure you can find them somewhere.

And you’re done. The webpart is now available in the webpart gallery and has the required files to work

Geen opmerkingen: