So I need the ability to trigger a Speak Application (either a Dialog or a Dashboard) from within code. This is going to happen from a custom command I have created that will process specific logic about the current context to determine which speak dialog to display. Is there a way to do this from within c# code?
You can open a SPEAK dialog using the SheerResponse.ShowModalDialog
command.
Example:
SheerResponse.ShowModalDialog(new ModalDialogOptions(url)
{
Width = "100",
Height = "200",
Response = true,
ForceDialogSize = true
});
The url
parameter is the Sitecore path of the SPEAK page, e.g: /sitecore/client/applications/dialogs/myPage
This should work if calling the dialog from a back end code.
Reference:
-
1Seems weird to trigger a Speak application using a Sheer method. :-) – Dylan Young May 31 '17 at 15:08