3

I have been testing ability to use various tokens in SRC attribute for app parts in SharePoint 2013. I try to investigate if it's possible to have an apppart that points to a page that is outside app web.

Let's assume I have page that I'd like to reference in such location: /Pages/KeyPersons/KeyPersons.aspx on the site collection.

When I specify src attribute for the page in app part as that: Src="~site/Pages/KeyPersons/KeyPersons.aspx it works only on the root web, as on the sub-webs it tries to reference Pages library on the current web instead of the root web.

When I specify src attribute using ~sitecollection, the token is not resolved to site colletion URL - actually the token is not resolved at all - resulting source for the IFrame is as follows: src="~sitecollection/Pages/KeyPersons/KeyPersons.aspx". The page renders with an error:

The file or folder name contains characters that are not permitted. Please use a different name.

Any ideas why ~sitecollection token does not work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.