maandag 6 augustus 2012

SharePoint 2013 URL tokens

Below a list of URL tokens that can be used at the beginning of the app URL specified in the app manifest file:

TokenResolves toRemarks
~appWebUrl
The URL of the app web of an app for SharePoint.
This token should be used only outside an app web. Within the app web itself, use ~site for the URL of the app web.
~controlTemplates
The URL of the ControlTemplates virtual folder for the current website.
This token cannot be used in the StartPage element of an app manifest, or in a custom action or app part on a host web.
~layouts
The URL of the Layouts virtual folder for the current website.
This token cannot be used in the StartPage element of an app manifest, or in a custom action or app part on a host web.
~remoteAppUrl
The URL of a remote web application in an app for SharePoint.
This token can be used in the app manifest only for autohosted apps. For provider-hosted apps, you must specify the URL. It can be used outside the app manifest for both provider-hosted and autohosted apps.
~site
The URL of the current website.
This token cannot be used in the StartPage element of an app manifest, or in a custom action or app part on a host web.
~sitecollection
The URL of the parent site collection of the current website.
This token cannot be used in the StartPage element of an app manifest, or in a custom action or app part on a host web.

URL tokens that can be used within URL's:

TokenResolves toRemarks
{AppWebUrl}
The URL of the app web in an app for SharePoint.
This token should be used only outside an app web. Within the app web itself, use {Site} for the URL of the app web.
{HostLogoUrl}
The logo for the host web of an app for SharePoint.
{HostTitle}
The title of the host web of an app for SharePoint.
{HostUrl}
The URL of the host web of an app for SharePoint.
{ItemId}
The ID of a item in a list or library (an integer).
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{ItemUrl}
The URL of the item being acted upon.
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{Language}
The current language/culture of the host web of an app for SharePoint.
{ListId}
The ID of the current list (a GUID).
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{RecurrenceId}
The recurrence index of a recurring event.
This token is not supported for use in the context menus of list items.
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{Site}
The URL of the current website.
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{SiteCollection}
The URL of the parent site of the current website.
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{SiteUrl}
The URL of the current website.
This token cannot be used in the StartPageelement of an app manifest, or in a custom action or app part on a host web.
{StandardTokens}
This combines three other tokens. It initially resolves to SPHostUrl={HostUrl}&SPAppWebUrl={AppWebUrl}&SPLanguage={Language}. Then each of these tokens resolves. If there is no app web, the portion &SPAppWebUrl={AppWebUrl} is not present.

Geen opmerkingen:

Een reactie posten