Monday, October 20, 2014

How to add custom control (delegate control) in SharePoint 2013 Masterpage(.html version)

Hi Floks,

Today I am going to talk regarding delegate control which is mostly used to insert SharePoint control in simple html pages. SharePoint contains many delegate control in it's default master-page. Some of them are as listed below:

  1. AdditionalPageHead

  2. GlobalSiteLink0

  3. GlobalSiteLink1

  4. GlobalSiteLink2

  5. PublishingConsole

  6. QuickLaunchDataSource

  7. SmallSearchInputBox

  8. TopNavigationDataSource


You can customize this control as well as you can create you own delegate control by following below steaps:

  • Create Blank SharePoint blank solution in Visual Studio 2012


Blank Solution for Delegate Control

  • Add Visual Web-part in the solution.


AddVisualWebpartinBlankSolution

  • Open Elements.xml file and do following changes.

    • Do comment in Module tag and add below code in Elements.xml file

    • You can modify the the attribute value as per your requirements.

    • ID: This is control ID which is used to refer in the MasterPage

    • Sequence: Sequence of the Control

    • Control Src: ASCX file path which contains design of your control




<Control Id="CustomTopNavigation"
Sequence="23"
ControlSrc="~/_CONTROLTEMPLATES/15/MyCustomTopNavigation/TopNavigationUserControl.ascx" />


  • After modifying the Elemetns.xml file your xml file looks like below image.Elements.xml

  • My deploy your solution on SharePoint Site.

  • Activate your solution Feature from the Site Settings.

  • Now Add below tag in you html file/master page (.html) version

  • Replace ControlID value as per ID value specified in Elements.xml file


<!--MS:<SharePoint:DelegateControl runat="server" ControlId="CustomTopNavigation" Id="topNavigationDelegate"/>-->


  • Save your master page and publish as major version and verify the page which inherited from that Master page you can see your control on that page.


Thanks.

Wednesday, October 15, 2014

Clear SharePoint Designer Cache

Hi Floks,

Today I am going to explain how to clear cache of SharePoint Designer. By clearing SharePoint Designer Cache following things of SharePoint Designer will be wiped out.

  1. Site history which you open in SharePoint Designer in the past

  2. Credentials which you stored in SharePoint site

  3. Site folders which will be created while opening site in SharePoint Designer


Steps to clear SharePoint Designer Cache



  • Open Run


run

  • Open below listed path & Remove everything from the folder


    • %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache



    • %APPDATA%\Microsoft\Web Server Extensions\Cache\





 

Now open SharePoint Designer, you can see all the history of we application which you opened in SharePoint Designer will be erased.

 

 

Wednesday, October 1, 2014

SharePoint URL shortcuts / URL of Pages which can be used for SharePoint Administrator

Below is the list of pages & their paths which can be accessed from URL :

Below listed URL's works for SharePoint 2010 for SharePoint 2013 please add /15/after /_layouts.

  1. Add web parts to any page: /append ?PageView=Shared&ToolPaneView=2

  2. Create New Site Content: /_layouts/create.aspx

  3. Create New Site: /_layouts/NewsbWeb.aspx

  4. List Template Gallery: /_catalogs/lt/Forms/AllItems.aspx

  5. Master Page Gallery: /_catalogs/masterpage/Forms/AllItems.aspx

  6. Manage your Alerts: /_layouts/SubEdit.aspx

  7. Create New Alert: /_layouts/SubChoos.aspx

  8. Manage Site Collection Administrators: /_layouts/mngsiteadmin.aspx

  9. Manage Sites and Workspaces: /_layouts/mngsubwebs.aspx

  10. Manage People: /_layouts/people.aspx

  11. Manage User Permissions: /_layouts/user.aspx

  12. Modify Navigation: /_layouts/AreaNavigationSettings.aspx

  13. Modify Site Navigation: /_layouts/SiteNavigationSettings.aspx

  14. Recycle Bin: /_layouts/AdminRecycleBin.aspx

  15. Site Directory: _layouts/SiteDirectorySettings.aspx

  16. Save Site as Template: /_layouts/savetmpl.aspx

  17. Site Settings page: /_layouts/settings.aspx

  18. Create New Web Part Page: /_layouts/spcf.aspx

  19. Site Template Gallery: /_catalogs/wt/Forms/Common.aspx

  20. Site Column Gallery: /_layouts/mngfield.aspx

  21. Site Content Types: /_layouts/mngctype.aspx

  22. Site Content and Structure Manager: /_layouts/sitemanager.aspx

  23. Site Usage Summary: /_layouts/SpUsageWeb.aspx

  24. User Alerts: /_layouts/sitesubs.aspx

  25. View All Site Content: /_layouts/viewlsts.aspx

  26. Web Part Gallery: /_catalogs/wp/Forms/AllItems.aspx

  27. Web part maintenance mode: /append ?contents=1 to the URL of the page

  28. Open the page in Edit Mode - In Address bar, Type: "javascript:MSOLayout_ToggleLayoutMode();" or  "javascript:MSOTlPn_ShowToolPane(’2′);" in the Address bar

  29. Add Web Parts Pane: ?ToolPaneView=2

  30. Display all content types of sites: /_layouts/mcontent.aspx