Pregunta

I am using SharePoint 2013.

I am using a modal dialog with the SP.UI.ModalDialog.showModalDialog method.

I also have a Ribbon in the custom application page.

This all worked in SharePoint 2010, but in 2013 it doesn't work. The ribbon is no longer showing.

How can I resovle this?

¿Fue útil?

Solución

In the SharePoint 2013 masterpage the elements that shouldn't be visible in the dialog mode (IsDlg=1) have the "s4-notdlg" CSS class applied. To solve your problem you have the following options:

  1. Dynamically (using jQuery for example) remove the s4-notdlg class form the div of the.Ribbon section
  2. Use the open-source library SharePoint 2013 Easy Ribbon API. We have tested this library with custom application pages, and it seems to satisfy all our needs.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top