Posts

Showing posts from May, 2013

Open a page in SharePoint Modal Dialog

I had a requirement to open a page in modal dialog and I used the following script for this. <script type="text/javascript"> function ShowDialog(url) {    var siteWebUrl = _spPageContextInfo.webServerRelativeUrl;    var options = SP.UI.$create_DialogOptions();    options.url = siteWebUrl+"/"+url;    /*options.height = 300;*/    SP.UI.ModalDialog.showModalDialog(options); } </script> <p> <a class="ms-addnew" onclick="javascript:ShowDialog('/Lists/UserSubscription/NewForm.aspx?RootFolder=&IsDlg=1')" href="javascript:void(0)">Subscribe</a> </p>

Add SharePoint group to People and Groups Quick Launch

Here is the script to add any SharePoint group to People and Groups Quick Launch using PowerShell script. $spWeb = Get-SPWeb “<site url>” $group = $spWeb.SiteGroups[“<group>”] $spWeb.Properties["vti_associategroups"] = $spWeb.Properties["vti_associategroups"] + “;” + $group.ID $spWeb.Properties.Update() $spWeb.Dispose()