none
How to open "Create" dialog modal box in a page ? RRS feed

  • Question

  • Hi All,

    I have SharePoint 2010 installed with Silverlight. Now when I click on "More options" under the "Site Actions menu", the create dialog modal box is displayed. But I want it to be displayed in a page instead of a dialog box (just like, if you dont have Silverlight installed, it opens on a page).

    Is there any easy solution to achieve this ?


    Thanks, Tejas

    Monday, July 23, 2012 7:56 AM

Answers

  • If you are willing to customize your master page;

    open the v4.master of your site (or whatever master you set as default), find the MenuItemTemplate with the id MenuItem_Create

    the property has some script logic set which basically check if you have silverlight and then open the modal dialog and if not, if navigates to /_layouts/create.aspx.

    The following code will open directly the Silverlight Version of the create.aspx page:

    ClientOnClickScriptContainingPrefixUrl="STSNavigate('~site/_layouts/AddGallery.aspx')"
    
    hope it helps


    http://gilleslauwers.wordpress.com


    Monday, July 23, 2012 8:31 AM

All replies

  • If you are willing to customize your master page;

    open the v4.master of your site (or whatever master you set as default), find the MenuItemTemplate with the id MenuItem_Create

    the property has some script logic set which basically check if you have silverlight and then open the modal dialog and if not, if navigates to /_layouts/create.aspx.

    The following code will open directly the Silverlight Version of the create.aspx page:

    ClientOnClickScriptContainingPrefixUrl="STSNavigate('~site/_layouts/AddGallery.aspx')"
    
    hope it helps


    http://gilleslauwers.wordpress.com


    Monday, July 23, 2012 8:31 AM
  • Hi,

    The link to the old version of the create page is http://site/url/_layouts/create.aspx.

    You can use a custom actiona to change the default Site Action menu button.

    Cheers,

    Dan. 


    You can find my blog here: http://developertrack.blogspot.com

    Monday, July 23, 2012 8:36 AM
  • Hi Gilles,

    Thanks for your post. You solution was correct albeit a little different change was required. But your solution guided me in the correct direction.

    The changes that I had done, for future help if required by any, were as follows :

    1. Open v4.master of your site (or whatever master page you have set as default )

    2. Locate the following piece of code

    <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
    	Text="<%$Resources:wss,siteactions_create%>"
    	Description="<%$Resources:wss,siteactions_createdesc%>"
    	MenuGroupId="200"
    	Sequence="240"
    	UseShortId="true"
    	ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('All')) { STSNavigate('~site/_layouts/create.aspx') }"
    	PermissionsString="ManageLists, ManageSubwebs"
    	PermissionMode="Any" />

    Remove the line ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('All')) { STSNavigate('~site/_layouts/create.aspx') }"

    and add the following line ClientOnClickNavigateUrl="~site/_layouts/create.aspx"

    Save your master page and refresh the site. Now when you click on "More options" under "Site Actions" menu, it will open in a page rather than modal dialog box.


    Thanks, Tejas

    Monday, July 23, 2012 9:22 AM