Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer
    
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 '13 at 7:42

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.

share|improve this answer
    
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 at 7:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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