only My site
Showing posts with label SharePoint OOB. Show all posts
Showing posts with label SharePoint OOB. Show all posts

Tuesday, February 19, 2013

Read CQWP Custom toolpart property from XSLT

Recentrly I had a requirement to set some custom property in the CQWP and hence I extended the CQWP using Toolpart custom fields. No problem till here and all are server side code and a lot of articles available in Google search. The second part is how to read the custom property is the challenging part.

The following are the steps.

In the web part class add the override ModfyXSLTArgumentList method, which will add the Information as parameter and will be used for XSLT processing. The article describes beautifully and have a look at it Extending content query web-part with custom data

The below link will describe about how to creat custom properties using Toolpart.

Sharepoint custom toolpart properties

Friday, December 28, 2012

Sandbox Solution - Good Links

I am in a Sharepoint online project and I am limited now with Sandbox solutions. Here I need to be cautious as the visual studio allows us to write (Farm solution code), compile and make packages which will not allowed deploying in Sharepoint online. However the VS2010 plugin Power tool restricts the code which are not allowed in sandbox solution.

I know most of the limitations and I was in search to do a complete study on SB Solution and found the simple but powerful article. Here is the links

  1. Sandbox Part1
  2. Sandbox Part2
  3. Sandbox Part3
  4. Sandbox Part4
Wonderful article in MSDN
http://msdn.microsoft.com/en-us/magazine/ee335711.aspx

Tuesday, December 25, 2012

Slideshow (Carousel) in Sharepoint 2010 CQWP

We can do customization the Sharepoint CQWP according to our need. Here is the one of the complex implementation of shideshow using jquery, css and CQWP. The article is well narrated with shreen shots. The Key elments are ItemStyle.xsl and ContentQueryMain.xsl.




https://www.nothingbutsharepoint.com/sites/eusp/Pages/SharePoint-Integrate-a-Slider-with-the-Content-Query-Web-Part-Part-1-What-does-my-Slider-Need-to-Work.aspx

https://www.nothingbutsharepoint.com/sites/eusp/Pages/SharePoint-Integrating-a-Slider-with-the-Content-Query-Web-Part-Part-2-Setting-up-my-Content-Source.aspx

https://www.nothingbutsharepoint.com/sites/eusp/Pages/SharePoint-Integrate-a-Slider-with-the-Content-Query-Web-Part-Part-3-Integration-with-the-CQWP.aspx

Known Issue and Resolution

While Implementing the above slider i had the following Issues.

Error :
"The web part references an untrusted XSL file. Only XSL files contained in this site's Style Library may be referenced"

Cause :
The path was pointing to the wrong location. Instead of "sites/MySiteCollectionName/Style Library/Xsl Style Sheets" location, it is pointing to "/Style Library/Xsl Style Sheets".

Resolution :
Change the properties in the CQWP File (export the web part and open it in notepad). Possibly we need to change the following file path properties
1. ItemXslLink - Example /sites/rd/Style Library/Xsl Style Sheets/Slider/ITemStyle.xsl
2. MainXslLink - Example /sites/rd/Style Library/Xsl Style Sheets/Slider/ContentQueryMain.xsl
3. Xsl

In the ContentQueryMain.xsl file, the following needs to be done
1. Add the jquery file (jquery.min.js) link in the code above the global.css. This may not required if the jquery link is available in Master page.
2. use ../ prefix for the "/Style Library" (if it is hosted in sites/rd)

Yet Another Slideshow with full code

http://chrisstahl.wordpress.com/2011/08/09/image-slideshow-with-cqwp-in-sharepoint-2010/

Item style customization steps

http://www.heathersolomon.com/blog/articles/customitemstyle.aspx

Friday, December 14, 2012

Content Query Web Part (CQWP) - SP2010 OOB Feature




Editing Properties in CQWP


The following are the key properties of CQWP : CommonViewFields, DataColumnRenames, QueryOverride