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

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  
hristopavlov.wordpress.com/2008/12/08/… gives some more, but it's just odd there's no microsoft page with this information. –  user1875 Nov 19 '10 at 22:23
add comment

2 Answers

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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