Thursday, May 14, 2015

How to hide ribbon from SharePoint page using CSS

Hi Folks,
In this post we are going to write a css class which will hide ribbon of the sharepoint page.

Below is the css class which does the trick.

#s4-ribbonrow
{
      display:none !important;
}


Hope this helps...

Related post: Hide Sharepoint Recent Changes Section

Open and Close a Sharepoint Modal Dialog with URL

Hi Folks, in my earlier post we have seen how to launch a popup in any page using purely jquery approach. Click here...
In this post we are going to acheive this with Sharepoint framework.

Sharepoint has exposed some client side functions where we can easily call a page as modal dialog/ pop up.

SP.UI.ModalDialog.showModalDialog(options) Method helps us in acheiving the same.

Below is the actual implementation of this function.

function openDialogAndReceiveData(tUrl, tTitle) {
         var options = {
             url: tUrl,
             title: tTitle,
    autoSize: false,
    width:600,
    height:350,
    dialogReturnValueCallback: onPopUpCloseCallBackWithData
         };
         SP.UI.ModalDialog.showModalDialog(options);
     }

function onPopUpCloseCallBackWithData(result, returnValue) {
//If any action that needs to be done on parent page upon close of popup.      
}

The above function is a generic one where we just need to call this function on the onclick of the button on which we are expecting the popin/modal dialog to be opened.
Parameters:
tUrl = absolute or relative path of the page which we need to see as a dialog
tTitle = Title of the modal dialog.

Hope this helps...

RELATED POST: Show and Hide a SharePoint modal dialog with HTML structure
RELATED POST: How to Show and Hide a jquery dialog popup

Tuesday, March 24, 2015

Sharepoint shortcut URL's

Hi Guys,

Sometimes we wanted to bypass some of the UI navigation steps and wanted directly to get into some page like settings or edit mode etc.,

Here are some of the relative links that I know.

Site Settings page:
/_layouts/settings.aspx

View all site content page:
/_layouts/viewlsts.aspx

Pages library:
/pages/forms/allitems.aspx

Manage Site Collection features page:
/_layouts/managefeatures.aspx?Scope=Site

Manage Site Features page:
/_layouts/managefeatures.aspx

Sign in as a different user prompt:
/_layouts/closeconnection.aspx?loginasanotheruser=true

If you want see which all webparts on a page, you can simple go to Web Part Maintenance page by adding the below query string to the end of the URL of any aspx page.
?Contents=1

Sandboxed Solution Gallery page:
/_catalogs/solutions/Forms/AllItems.aspx

Welcome Page settings page:
/_layouts/AreaWelcomePage.aspx

Happy Learning...

Popular Posts