1

I want to create a site action menu item Custom Action which opens a Sharepoint 15 app (default.aspx) as modal dialog. is it possible? thanks.

3 Answers 3

2

There is out of the box support for opening a dialog from custom action. Add following attributes to the CustomAction XML node --

  • HostWebDialog : Set it to true if you want to open a dialog
  • HostWebDialogWidth: Width of the dialog
  • HostWebDialogHeight: Height of the dialog

For more information go to my blog here. Hope this would help you.

1
  • what I meant with site action menu was that menu contians site setting and site content, under the gear. I want to have a menu there that you can open an sharePoint app in a modal winodow. the exampel in your link is for List under EditControlBlock
    – Medes
    Aug 8, 2014 at 7:49
1

Open Elements.xml file of custom action and add following attributes in tag.

        HostWebDialog="TRUE"
        HostWebDialogWidth="600"
        HostWebDialogHeight="400

and then in your aspx page add

<WebPartPages:AllowFraming ID="AllowFraming" runat="server"/>

For detail documentation go to this link - How to create custom action opens in Modal - SharePoint App

0
0

You should be able to do it through the following way:

1) Create a SharePoint page: placeHolder.aspx

2) Create an AppPart/Client WebPart for your App and place it on placeHolder.aspx

3) Open placeHolder.aspx inside the Modal Dialog

4) Open the Modal Dialog from a custom action.

1
  • Do you mean a usual Custom Action or those that came with SharePoint Apps. If it is a usual how do I can point to the app part? and If it is a custom action app then how can I open a modal dialog. I have previously created Custom Actions which opened application pages as modal. but a usual Custom action can not be added to a SharePoint App project.
    – Medes
    Feb 27, 2013 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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