Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a data form web part that I use in multiple locations in my site. In some cases the page the web part is on is a list form, so the url might be http://example/sites/MySite/Lists/MyList/DispForm.aspx. In another case the web part will be on an application page, so the url may be http://example/MySite/SitePages/appPage.aspx.

My Xsl is defined in a custom file that is referenced via XslLink rather than being included directly in the web part's Xsl tag.

How do I include a link to a page on my site that is relative to the root of the site (site collection would work as well)?

I'm aware of the WebUrl parameter but I don't know how I might use that parameter in my xsl.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.