0

I've followed this tutorial to create an extension that displays an alert on top of the page:

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions

However; I would like the alert to be really on top, even on top of the Office 365 bar.

Is it possible to add a placeholder on top of the Office 365 bar?

In the example bellow, the green alert would need to be on top of the blue bar.

enter image description here

2

The workaround, use jQuery to change the DOM sequence.

For example:

jQuery('#SuiteNavWrapper').prepend(jQuery('div[data-sp-placeholder="Top"]'));

enter image description here

| improve this answer | |
2

Unfortunately, there is no way to create new placeholders. The footer and the header is all we have and we cannot move them closer to the top.

However, if you really want to, you can place any HTML anywhere on the page with a bit of JavaScript. This is not the recommended approach, but I had to do it in the past if some projects really required it.

| improve this answer | |

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.