Is it possible to pull the value of a property, from a web part into XSL?

I need to build something similar to the standard Summary Link Web Part, but would like to extend the default control with only a single property which will allow the editors of the site to supply a URL to a link, located in the footer-item of the SummaryLinkMainQuery.xsl.

2 Answers 2


Definitely passing webpart values to XSLT is possible for all classes which inherit from DataFormWebPart, and can be easily done through ParameterBinding:

<ParameterBinding Name="WPPropertyBinding" Location="WPProperty(Title)" />

Use your custom property name instead of Title.

If you're using a standard SummaryLinkWebPart and you need only to fix XSL transformation, then all you have to do to achieve this, is to add the parameter binding string shown above to ParameterBindings property of SummaryLinkWebPart.

Then, in XSLT, reference this parameter using following xsl code:

<xsl:param name="WPPropertyBinding" />

From this point, you will be able to use the parameter in XPath queries, for example:

<xsl:value-of select="$WPPropertyBinding" />

Read more about ParameterBindings on Stefan Stanev's blog, he has a really comprehensive article about it:


Watch out as SummaryLinkWebPart is a sealed class - you can't inherit it. Basically you'd have to build it from scratch.

  • just saw that as well. i wanted to get assurance that there is a way to call property values in xls, let's say "MyProperty {get; set;}", how would I call that in XSL? "<%=this.MyProperty%>" or something similar?
    – JadedEric
    Oct 26, 2011 at 7:29
  • You could /try/ and adding to the list of xsl params that are at the top of the Main xsl.
    – James Love
    Oct 26, 2011 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.