I embedded a document library on my SharePoint site using a custom embed Web Part.

The embed code looks like this:

<iframe src="https://myorg.sharepoint.com/sites/mysite/Documents/Forms/AllItems.aspx?RootFolder=%2Fsites%mysite%2Fmyfolder" width="500" height="500"></iframe>

It works great.

However, I'd like to prevent users from exiting the RootFolder. They can currently do so by clicking the navigation bar at the top.

Is this possible?


No, this is not possible.

While using iframe in embed web part there is no control on what to show and what not in web part.

You cannot restrict users from clicking on navigation bar.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.