UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007


Published on

This is an old presentation from the SharePoint APAC Conference in Sydney.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Microsoft Dynamics
  • Microsoft Dynamics Intro slides: 1-2 (3mins) Today I am going to talk about customising SharePoint. In order to customise SharePoint you will need to understand about the SharePoint default HTML, CSS and Master Page resources. I will try and cover off WSS V3 and MOSS 2007 customisations. There are two more sessions in this series that I highly recommend you to attend if you are a designer/developer. Main thing to note is that when I talk about customisation I am referring to the UI of SharePoint. I will not be talking about any development or coding at this session. This session is for User interface customisations. It’s important if you are a developer that for you to understand how the UI can be customised as SharePoint is heavily UI driven. So as part of this session We’ll look at how to customise SharePoint sites using the browser. Then we’ll take a quick look at SharePoint Designer and how to use SPD to make design changes to a SharePoint site. SharePoint designer is the new tool that you use to customise SharePoint sites. For more powerful layout changes you will be using Visual Studio .net and SharePoint Designer. Then we’ll wrap it all up with a summary and a round of questions. There will be demos all the way through.
  • The session objectives for today will be to showcase about options available to you for customising SharePoint Learn about the CSS elements in SharePoint and how to change these to customise sites Learn how to create and modify existing master pages Learn about page layouts Microsoft Dynamics
  • Slide 4 > Customisation options and the tools   So there are 3 main options available for you to customize SharePoint Browser The first being using the browser you can achieve some minimum customisations and you don’t need to have any special skills in order to do that.   SPD Then using SPD you can do a bit more by changing the CSS and the master pages and you need some level of web dev experience. Important thing to know is that when using SPD to customise sites you are actually editing pages inside the content database. What I mean by that is all SharePoint pages are in a content database and SPD interacts with that.   You are not customizing pages found on the “_layouts” folder which is on the file system.   Then the next available option is that you can use Visual Studio.net where you do complex customisations. This means you will be building site definitions and new site templates and coding new features. So this is most suitable if you are building apps based on SharePoint. For doing development you will need to have a ‘sandbox’ or a server box. The most popular way for doing this is to use Virtual PC Images with a SharePoint server. Microsoft Dynamics
  • Slide 5   Customise SharePoint via the Browser So let’s look at what options you have when customising SharePoint via a browser. If you are a site user and want to make some changes to the site look and feel you can do that via the browser. The main things that you can change via the browser without any coding whatsoever are: Change the site logo Change the site web part layouts or add some new web parts Change the “Quick Launch” navigation Change or add a new tab navigation element Go to > “Look and Feel” Select “Navigation” > Apply a new “theme” And if the site is based on MOSS you can apply new “chrome” from the existing master page gallery Microsoft Dynamics
  • Slide 6 Demo DEMO – Browser Customisation Here we have a typical WSS team site. And one of the most common things most people want to do is change the site title and the description and display the company logo. So let’s look at how we do that. Here I am logged in as an administrator to this ‘site collection’. And I will switch to “Modify All Site Settings”. Then I am going to change the “Site Icon” and “Site Title” Then I am going to change the “Quick Launch” menu to display this in a tree view. I am now applying a new “Theme”. Themes are located on the file system you can build themes by copying an existing theme and applying changes to CSS and Images. OK we saw what we can do with the browser customisation. Microsoft Dynamics
  • Slide 7 : SharePoint Designer Customisations Let’s move on to SharePoint Designer and see what you can do with SharePoint Designer SharePoint Designer is the tool that you will use to customize SharePoint sites. It is the evolution of FrontPage. Go to the UX02 session for an in depth look at SPD and how to build no code solutions using SharePoint Designer. With SharePoint Designer you can do the following Modify default style sheets and create new style sheets Create and Edit master pages (I’ll come back to master pages) Create and edit publishing page layouts for MOSS Safety net! You can “un-ghost” = revert to site definition now available Master pages allows you to apply branding across SharePoint sites. Microsoft Dynamics
  • Slide 8 CSS customisations (30 secs) SharePoint default Style sheets are located in the “12 Hive”. A WSS only installation has the following styles and when you have a MOSS install you get theses extra CSS style sheets as well. Microsoft Dynamics
  • Slide 9 (CORE CSS mod creates a style sheet in _styles When you open up one of the style sheets from SPD and make an edit to the style sheet and save it the master page CSS link reference to the file system changes and a copy of the style sheet is made in the “_styles” folder. To get rid of your customisation you just delete the CSS from “_styles” Microsoft Dynamics
  • Slide 10 (Demo) First we’ll look at editing the existing default style sheets that come with SharePoint. So I will open up a SharePoint site in SPD and then select a master page, open one of the pages and this shows the default style sheet. Then I am going to make a simple edit on the style. As soon as I save this change SPD will make a copy of the “Core.css” and add it to a folder named “_styles” in the content db. This concept is referred to as “ghosting”. In previous versions when this happened there was no easy way to recover but now with SPD you don’t need to worry about that because SPD allows you to revert your changes to the original state. To get rid of the customised CSS you can simply delete it. As you can see I can make site wide changes by editing and overriding the ‘core.css’ file. Now another tool I want to highlight is the IE developer toolbar. Enable developer tool bar. You can download this from the IE web site. I’ll provide the link to the download. Show some things with the developer toolbar. For a detailed list of each style go to Heather Solomon’s blog. I will make the URL available for you after this session. Microsoft Dynamics
  • Slide 11 (Customisation Tips) As you saw in my demo you can use SPD to make changes to the style sheets. SPD allows you to do some smart editing and provides you with a very good visual way of editing style sheets. The style sheet task pane allows you to apply filters so that you only work on the styles that you need for that particular page or section. And if you have not downloaded IE developer tool bar I recommend that you download it. Because as you saw it provides you with good visual clues to what styles are used etc. Microsoft Dynamics
  • Slide 11 (Master pages) The next level of customisation that I am going to talk about is about master pages. Master pages are not a new concept if you have built ASP.net 2.0 web sites you will have used master pages. SharePoint master pages are located on the file system in the “PublishingLayouts” directory. C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\12\\TEMPLATE\\FEATURES\\PublishingLayouts\\MasterPages Go to Slide 12 Microsoft Dynamics
  • A single master page can control the look and feel of an entire web site or web application. Content pages are the other ‘half’ of master pages. Content pages define the content. Together they create the presentation layer of a web site. In SharePoint ‘content pages’ are called “ Page Layouts ” They work similar to content pages. The SharePoint master page file is combined with a page layout file to create the presentation layer of content in a SharePoint site. Microsoft Dynamics
  • In SharePoint there are two dynamic tokens used for master pages. This is basically a separation between sites and system pages. Then there are two additional ‘static tokens’ used. Sitecollection/default.master Site/default.master This allows you to change the master pages used by sites in SharePoint. A site master page is where you do look and feel branding customisations. The master pages included with Office SharePoint Server 2007 are based on the ‘SPWeb.CustomMasterUrl’ of the ‘SPWeb’ class in Microsoft Windows SharePoint Services. Microsoft Dynamics
  • Slide 15 What this slide is illustrating is the relationship of SharePoint page layouts and where these are stored. Inside a web site you have ASPX and Master Pages that has been created and setup based on the site definition rules of the “Site Templates” directory in the 12 hive. When you make a modification to the default.aspx in your site you are “ghosting” a page. You can now revert your changes back to the original format by going to the “site settings” and choosing “revert to site definition”. The other set of pages which is stored in the “_layouts” directory is part of the SharePoint application. You can customise these but you have to make extra care when you do that as these may be changed with service pack updates and such like. Microsoft Dynamics
  • Slide 16 The “default.master” page has a series of Placeholders. Placeholders define where content goes in a master page and you can override these content placeholders. When you require a blank master page for use with a site you need to define all of the placeholders in the new master page you create. The easy way of doing this is to get hold of the “minimal” master page from the MSDN site. Microsoft Dynamics
  • Slide 17 (Demo) We’ll now look at working with master pages in SharePoint designer. I am going to open up SharePoint designer and open a new web site. This SharePoint site is based on the ‘Team Site Template’. Open > http://apacdemosite/DemoCSS2/default.aspx Navigate to the “_catalogs” directory and choose the “default.master” I am going to make a copy of default.master. Call it “DEMO2.master”. Now I am going to open the master page. I am going to make some changes to the “master page”. I have some code that I have made earlier which I will paste on to the new master page I created. Now I will make a copy of “default.aspx” then set the reference of the copied page to that of the new master page I created. Now I can change the look and feel. Or the other option will be to set the new master page as the “default master page”. Microsoft Dynamics
  • Slide 18 (Customisation) You can start from scratch but I highly recommend that you start with minimal master page. Or you copy an existing master page and remove all the markup by hand. Heather Solomon Master Pages http://www.heathersolomon.com/blog/articles/MOSS07DesignComponents.aspx http://www.heathersolomon.com/blog/articles/sp2007.aspx Minimal master page file http://msdn2.microsoft.com/en-us/library/aa660698.aspx Microsoft Dynamics
  • Slide 19 (Layout architecture) When you are in a WSS site the aspx pages refer to the spweb.masterurl token which is from “_catalogs/masterpage/default.master” In MOSS there is a “Page Layout” which gives more flexibility for your layouts and token is spweb.CustomMasterUrl. This means that one master page can be used by different page layouts. Microsoft Dynamics
  • When working in SPD and masterpages use split view. The master page tool bar gives you the ability to choose the placeholder control you need. The tag toolbar helps you to select various properties and the hierarchy. Version history will allow u to roll back. Microsoft Dynamics
  • Create a new page layout Add a layout control Create a new page based on the layout Microsoft Dynamics
  • http://heathersolomon.com/blog/articles/148.aspx Microsoft Dynamics
  • UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007

    1. 2. UX01 A Guided Tour Through  SharePoint  HTML, CSS, and Master Page Resources  Chandima Kulathilake Microsoft MVP (Microsoft Office SharePoint Server) http://www.chandima.net/Blog/ Provoke Solutions, New Zealand
    2. 3. Session Objectives <ul><li>Learn about options available to you for customising SharePoint </li></ul><ul><li>Learn about the CSS elements in SharePoint and how to change these to customise sites </li></ul><ul><li>Learn how to create and modify existing master pages </li></ul><ul><li>Learn about page layouts </li></ul>
    3. 4. Customization Options and Their Tools Change Site Logo, Format, Parts Change Colors, Backgrounds, Fonts Edit CSS files <ul><li>Change Page Layout and Content </li></ul><ul><ul><li>Edit Master Pages Edit Page Templates (MOSS only) </li></ul></ul>Share Your Customization with Others Build Themes and Site Definitions easy Browser SharePoint Designer SPD + Visual Studio complex
    4. 5. Customization Options and Their Tools Browser based customizations <ul><li>Change the site logo </li></ul><ul><li>Change the site web part layouts or add some new web parts </li></ul><ul><li>Change the “Quick Launch” navigation </li></ul><ul><li>Change or add a new tab navigation element </li></ul><ul><li>Apply a new “theme” </li></ul><ul><li>And if the site is based on MOSS you can apply new “chrome” from the existing master page gallery </li></ul>
    5. 6. Demo <ul><li>Customizing SharePoint in the browser </li></ul>
    6. 7. Customization Options and Their Tools SharePoint Designer based customizations <ul><li>Modify default style sheets and create new style sheets </li></ul><ul><li>Create and Edit master pages </li></ul><ul><li>Create Publishing Page Layouts </li></ul>
    7. 8. SharePoint Style sheets WSS vs MOSS
    8. 9. Customizing SharePoint CSS core.css _layouts (on disk) default.master Normal <CssLink/> core.css _layouts (on disk) default.master core.css _styles (in web) Customized <CssLink/>
    9. 10. Demo <ul><li>Customizing SharePoint CSS in SharePoint Designer </li></ul>
    10. 11. CSS Tips and Tricks <ul><li>Modify any style from a SharePoint style sheet to trigger customization </li></ul><ul><ul><li>Custom CSS file (core.css) stored in _styles folder in web </li></ul></ul><ul><ul><li>Delete to turn off customization </li></ul></ul><ul><li>In SharePoint Designer: </li></ul><ul><ul><li>Use filters in Apply Styles task pane to see just the styles used by the current page or selection </li></ul></ul><ul><ul><li>Use CSS Property Grid to analyze overrides </li></ul></ul><ul><ul><li>Use the Summary mode in CSS Property Grid to view only the set properties </li></ul></ul><ul><ul><li>Use IE Developer Toolbar or Mozilla </li></ul></ul>
    11. 12. Customization Options and Their Tools Change Site Logo, Format, Parts Change Colors, Backgrounds, Fonts Edit CSS files <ul><li>Change Page Layout and Content </li></ul><ul><ul><li>Edit Master Pages Edit Page Templates (MOSS only) </li></ul></ul>Share Your Customization with Others Build Themes and Site Definitions complexity Browser SharePoint Designer SPD + Visual Studio
    12. 13. Master page concepts <ul><li>One page (master) holds the “chrome” </li></ul><ul><li>Many pages point at the Master </li></ul><ul><li>Master Page defines “Placeholders” which can be overridden in child page </li></ul>Master Page “Chrome” (default.master) Content Page (default.aspx)
    13. 14. Master page tokens <ul><li>Two dynamic tokens </li></ul><ul><ul><li>~masterurl/default.master </li></ul></ul><ul><ul><ul><li>spweb.MasterUrl </li></ul></ul></ul><ul><ul><ul><li>“ System Master Page” in MOSS (For App Pages) </li></ul></ul></ul><ul><ul><li>~masterurl/custom.master </li></ul></ul><ul><ul><ul><li>spweb.CustomMasterUrl </li></ul></ul></ul><ul><ul><ul><li>“ Site Master Page” in MOSS (For Sites) </li></ul></ul></ul><ul><li>Two static tokens </li></ul><ul><ul><li>~sitecollection/default.master </li></ul></ul><ul><ul><li>~site/default.master </li></ul></ul>MOSS User Interface:
    14. 15. SharePoint Page Layout Application Pages /_layouts/ application.master .master /_layouts/ create.aspx .aspx Spweb.masterurl default.aspx /shared documents/ allitems.aspx /_catalogs/masterpage/ default.master .aspx .aspx .master Content Pages http://myserver File System Templates ..Common FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplates SiteTemplatesSTS default.aspx Pages viewpage.aspx Global default.master
    15. 16. Default.master Placeholders Default.master contains ~30 placeholders, ~22 of them in the page body All of them must be defined in a replacement master
    16. 17. Demo <ul><li>Working with Master pages in SharePoint Designer </li></ul>
    17. 18. Master Page Customization <ul><li>Two techniques for customizing layout: </li></ul><ul><ul><li>Start with a copy of default.master </li></ul></ul><ul><ul><ul><li>Remove markup around placeholder </li></ul></ul></ul><ul><ul><ul><li>Rebuild in place </li></ul></ul></ul><ul><ul><li>Start with a blank or minimal master page </li></ul></ul><ul><ul><ul><li>Build from ground up </li></ul></ul></ul><ul><ul><ul><li>Copy placeholders from default.master or </li></ul></ul></ul><ul><ul><ul><li>Minimal.master page available to download from MSDN </li></ul></ul></ul><ul><ul><ul><li>http://msdn2.microsoft.com/en-us/library/aa660698.aspx </li></ul></ul></ul>
    18. 19. MOSS Layout Architecture default.aspx gets “chrome” from tasks/forms/ allitems.aspx pages/ gearsofwar.aspx pages/ lostplanet.aspx gets “layout” from _catalogs/masterpage/ game.aspx _catalogs/masterpage/ default.master gets “chrome” from _catalogs/masterpage/ default.master spweb.MasterUrl spweb.CustomMasterUrl WSS Layout Architecture
    19. 20. Master Page Cast of Control Characters (in order of appearance) <ul><li><SharePoint:CssLink> </li></ul>Renders path to default CSS file for site, plus spweb.AlternateCssUrl, if specified <SharePoint:Theme> Renders theme CSS files, if a theme is specified for the site <SharePoint:ScriptLink> Renders a link to a script file with a date time hash <head> control <head> control <head> control <SharePoint:CustomJSUrl> Renders a link Custom JavaScript URL defined in onet.xml (if present) <head> control <SharePoint:SoapDiscoveryLink> Renders path to .disco file, which lets clients like VS2005 discover web services on the sever <head> control
    20. 21. Master Page Cast of Control Characters <ul><li>Allows swapping of controls via feature </li></ul><ul><ul><li>Example: search is basic in WSS, advanced in MOSS </li></ul></ul><ul><ul><li>Lower sequence number in feature.xml determines winner </li></ul></ul><SharePoint:DelegateControl> Allows for feature-driven, declarative determination of a Child control to render in a page <head> control <ul><li>Delegate Controls: </li></ul><ul><ul><li>AdditionalPageHead – Free for all </li></ul></ul><ul><ul><li>GlobalSiteLink0, 1, 2 – Area at top right of page </li></ul></ul><ul><ul><li>SmallSearchInputBox – Search area </li></ul></ul><ul><ul><li>TopNavigationDataSource </li></ul></ul><ul><ul><li>PublishingConsole </li></ul></ul><ul><ul><li>QuickLaunchDataSource </li></ul></ul>
    21. 22. Master Page Cast of Control Characters <WebPartPages:SPWebPartManager> Enables web part framework on MasterPages. WebPartManagers should generally always be defined in master pages. <asp:SiteMapPath id=&quot;GlobalNavigationSiteMap&quot; > Provides top navigation breadcrumb. Connects to SPSiteMapProvider (also used for page breadcrumb) nonvisual control <wssuc:Welcome > Provides Welcome <user> dropdown with per-user options. <SharePoint:SPLinkButton>/ <SharePoint:ProjectProperty Property=&quot;Title“> Renders Title of the Site with a link back to the home page. <SharePoint:SiteLogoImage> Renders logo of the site if defined on the web, or the value of the LogoImageUrl property
    22. 23. Master Page Cast of Control Characters <SharePoint:AspMenu ID=&quot;TopNavigationMenu&quot; Displays top navigation “tabs”. <SharePoint:SiteActions> Renders the SiteActions dropdown. Note that the SiteActions dropdown can be extended via ‘ features’ or directly in page. <wssuc:DesignModeConsole > In edit mode, shows the editing status of the page and provides an Exit Edit Mode button. <SharePoint:FormDigest> Renders a security hash into the page; needed for performing some updates. <SharePoint:SPNavigationManager> Manages a left hand navigation control (either the Quick Launch list, or the tree view) nonvisual control
    23. 24. Master Pages Tips and Tricks <ul><li>Toggle Visual Aids off for WYSIWYG view </li></ul><ul><ul><li>Collapses empty placeholders </li></ul></ul><ul><li>Split view is your friend </li></ul><ul><ul><li>Select in Design view, see source in Code view </li></ul></ul><ul><li>Use Master Page toolbar to select placeholders by name </li></ul><ul><li>Use Tag Toolbar to diagnose hierarchy and make tricky selections </li></ul><ul><li>Safety net: </li></ul><ul><ul><li>Use Version History command to roll back </li></ul></ul><ul><ul><li>Use Revert command to get back to original master from site def </li></ul></ul>
    24. 25. Customizing Page Layouts Office SharePoint Server <ul><li>Design for Publishing Pages is simple: </li></ul><ul><ul><li>Browser UI for entering content (authors) </li></ul></ul><ul><ul><li>SharePoint Designer for creating/editing new Page Layouts (designers) </li></ul></ul><ul><li>Like ghosting, but inside the content DB </li></ul><ul><li>Special entry point in SharePoint Content section of File : New dialog when Publishing feature is activated </li></ul><ul><li>Special Toolbox categories appear when editing a Page Layout </li></ul>
    25. 26. Last Demo <ul><li>Page Layouts </li></ul>
    26. 27. Summary <ul><li>Saw how to customize SharePoint using the browser </li></ul><ul><li>CSS based customizations </li></ul><ul><li>Master page customizations </li></ul><ul><li>Page layout build </li></ul>
    27. 28. Resources <ul><li>My blog – presentation deck files and samples will be available for download </li></ul><ul><ul><li>http://www.chandima.net/Blog/ </li></ul></ul><ul><ul><li>http://blogs.provoke.co.nz/Ari </li></ul></ul><ul><ul><li>http://blogs.provoke.co.nz/Zac </li></ul></ul><ul><li>SharePoint Designer Team Blog </li></ul><ul><ul><li>http://blogs.msdn.com/sharepointdesigner/ </li></ul></ul><ul><li>SharePoint Team Blog </li></ul><ul><ul><li>http://blogs.msdn.com/sharepoint </li></ul></ul><ul><li>SharePoint Developer Portal on MSDN </li></ul><ul><ul><li>http://msdn2.microsoft.com/en-us/office/aa905503.aspx </li></ul></ul><ul><li>SharePoint Community Portal </li></ul><ul><ul><li>http://sharepoint.microsoft.com/sharepoint/default.aspx </li></ul></ul>
    28. 29. Thank you and Q & A <ul><li>Don’t forget your evaluation form  </li></ul>