I would like to display a customized message on top of the "New Site" dialog window, however since it is Silverlight I'm not sure if this is even possible.

I've thought of using javascript to highjack the "New Site" click event from the "Site Actions" menu before the dialog is displayed and show the message here. Then when the user clicks OK open the dialog with the Silverlight control and proceed as normal. But this seems like quite a hack and possibly not worth investigating further. Also it will not work if you create the web through "Manage Site Structure".

Is there an easier way to do this? Like a mechanism in SharePoint similar to how you add custom actions to the site actions menu? The message does not have to be a popup, just some way of displaying custom text as the user tries to create a new web.

  • Are you talking about changing default "Create" at the top to something custom? Feb 7, 2013 at 9:17
  • No, I just want to display a message to the user. A popup, label or something. I don't need to change the Silverlight control at all. I just want a message to pop up above it that the user can then dismiss and continue using the default dialog like normal.
    – Thomas
    Feb 7, 2013 at 9:24

2 Answers 2


I think less "painful" approach for you is modifying v4 masterpage. It contains SharePoint:SiteActions control with SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateSite".

You can update code in ClientOnClickScriptContainingPrefixedUrl to perform your logic, for example showing confirmation message like I do it:

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateSite"
    ClientOnClickScriptContainingPrefixedUrl="if (confirm('Are you sure?')) { SP.UI.ModalDialog.showModalDialog({url:'~site/_layouts/AddGallery.aspx', title: 'Create', width: 1050, height: 600}); }"
    PermissionMode="All" />

Not as far as I know. As you rightly commented, this is a Silverlight component. Silverlight components are wrapped in Cab files and you dont have any way of changing it. Also, you can't hack it if you wanted using Javascript. JS and Silverlight are two totally different components. JS is used to modify DOM elements. Silverlight is an Object in the DOM, but uses a client plugin which you have no control over. If you really wanted to , i'd suggest you create your own Silverlight Component which mimics the existing Silverlight window for creating sites/lists/pages and hook it up to the Site Actions > More Options link.

  • What I meant about the script was to intercept the event before the dialog is shown and display the warning. Once the user clicked ok in the message (s)he would be redirected to the regular Sharepoint dialog.
    – Thomas
    Feb 7, 2013 at 8:28
  • Creating a new Silverlight control just for a message is not something I'm willing to do, but thanks for the reply.
    – Thomas
    Feb 7, 2013 at 8:29

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.