SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I've discovered: $SPUrl:~SiteCollection $SPUrl:~Site ~language (e.g. $SPUrl:~Site/yadda/~language/yadda or whatever)

Where can I find a comprehensive listing of what's available for use with $SPUrl? And are there other prefixes like $SPUrl that can be used?

share|improve this question
2… gives some more, but it's just odd there's no microsoft page with this information. – user1875 Nov 19 '10 at 22:23

I have not seen this documented anywhere. The ones I am aware of in SharePoint 2010 (from exploration) are:

~site/ : SPContext.Current.Web.ServerRelativeUrl

~sitecollection/ : SPContext.Current.Site.ServerRelativeUrl

{ItemId} : item.ID.ToString() (or item["BdcIdentity"] if external list)

{ItemUrl} : item.Url

{SiteUrl} : web.Url

{ListId} : list.ID.ToString(“B”)

{ListUrlDir} : list.RootFolder.Url

{RecurrenceId} : item.RecurrenceID

{Source} : Request URL

The usual caveats apply: if it is not documented, there is no guarantee it will still work in the next version or service pack.

share|improve this answer

I think only ~sitecollection, ~site and ~language are supported by the SPUrl expression builder.

share|improve this answer

Your Answer


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