February 2013 MNSPUG IW Part 2

advertisement
Customizing Sites and
Pages in SharePoint 2013
WES PRESTON
Session Abstract
This session covers an overview of how to do basic customizations of
SharePoint 2013 sites and pages – beginning with capabilities in the
web interface and similar to the activities you would have used
SharePoint Designer for with the 2010 platform. These include
conditional formatting, customizing views, etc… If you are a
SharePoint 2010 power-user that utilized SharePoint designer for
page customization, this session will show you where to start with
2013. If you are a developer or designer, this session will show you
what out of box and client-side customizations are available with
2013.
Intro: Wes Preston
Based in Minneapolis, MN
MVP – SharePoint Server (5 years)
MCITP – SharePoint Administrator 2010
MCTS – SharePoint 2010, Configuration
MCTS – WSS 3.0 and MOSS Configuration
www.idubbs.com/blog
www.trecstone.com
@idubbs
wes@trecstone.com
Agenda
Overview
General Features and Updates
◦ New Templates
◦ Apps
Styling
◦ Change the Look
◦ Design Manager
Client-Side Rendering
◦ JS Link
Overview
Ground Rules and Changing Times
Microsoft recommends leading with out-of-box solutions whenever possible
◦ Get to know SharePoint’s features and capabilities before adding customizations
SharePoint Designer 2013
◦ Aimed at Developers for page customizations – Code View only
◦ Extending functionality for power users no longer available without Design View
Configuration vs. Customization
Web
Interface
SharePoint
Designer GUI
HTML, CSS,
XSLT,
JavaScript
Web
Interface
Apps
HTML5,
CSS,
JavaScript
.NET
.NET
What is ‘Customization’ in SharePoint
The answer depends on the audience:
Important when communicating with each group
May vary within each organization
User ‘Customization’
Lists, Libraries, (now ‘Apps’) and Views
◦ App Templates
◦ Columns, metadata, fields
Options available via the browser
◦
◦
◦
◦
Page Layouts
Web Parts
Formatting Text and Graphics
Site Pages and Wiki Pages
Power Users
Skillset 1
◦
◦
◦
◦
Connected web parts
SharePoint Store apps
HTML in Calculated Fields
SPD Workflows
Skillset 2
◦ ‘Copy/Paste Development’
◦ Simple Client-Side Rendering (CSR)
‘Pro’ Developers
Full range of customization options and opportunities:
Some of the same, some new… LOTS of options.
◦
◦
◦
◦
Farm and Sandbox Solutions
Apps
New look and feel options
Advanced Client-Side Rendering (CSR)
SharePoint 2013 New Features
Add ‘Tiles’ to the page – the Promoted Links app (see blog post)
Timeline Views, Project Summary, etc…
Themes, Branding and Style options
SharePoint Designer 2013
Expanded workflow management capabilities
◦ Out of scope for our discussion
No more Design View
◦ Can still/only make changes directly to code
Simple Client Side Rendering (CSR)
◦ JavaScript editing
◦
Apps Overview
Out-of-the-box Apps
◦ Same lists and library templates we’ve been using, with a few new ones in 2013
SharePoint App Store
◦ 3rd Party Apps – Lots of potential here…
Private App Catalog
◦ In-house custom developed (.NET) created apps specific to the organization
◦ Custom Lists with specific views, functionality, etc.
Branding
Branding, Styles and Theming
‘Looks’
◦
◦
◦
◦
Choose from pre-created Looks
Tweak look details and preview before applying
Add or Edit color palettes (at Site Collection level)
Deprecated: Create themes using PowerPoint
Design Manager
◦ Ease of use for Dreamweaver, Notepad, others
◦ Export and Import Design Package
◦ Snippets
Change the Look
Galleries
◦ Add New Font Schemes (XML)
◦ Add New Color Palettes (XML)
◦ Add Master Pages (Must be ‘15’ to show in dropdown)
Composed Looks
Essentially pre-baked packages of:
◦
◦
◦
◦
Master Pages
Background images
Fonts
Color Palettes
Demo
THEMES AND COMPOSED LOOKS
Demo - Looks
Change the Look
Demo – Looks
Change the Look -> Tweak a Composed Look
Demo - Looks
Theme Gallery
Demo - Looks
Color Palette
Font Scheme
Demo - Looks
Composed Looks
Demo - Looks
Composed Looks
Design Manager
Design Manager is NEW for 2013
Only available with Publishing enabled
Maps a network drive for 3rd party apps to integrate (Dreamweaver)
◦ Uploaded files are converted to master pages
◦ Snippets Wizard – configure, cut and paste
Same Master page, Page Layout, CSS relationships as earlier versions
New Display Templates
New Design Packages
Client Side Rendering
Template Evolution
SharePoint 2010
◦ Data + XSL = HTML
Server-side processing
SharePoint 2013
◦ Data + .js = HTML
Client-Side Processing
What is Client-Side Rendering (CSR)
JavaScript
HTML
CSS
Display Templates
CSR Implementation
Deploy as an App
Deploy as a solution
Deploy manually and configure JS Link
Choose the implementation approach that best fits your needs.
◦ “It depends”…
Simple CSR Approach
Showing main components of the JS Link approach
Master Page Gallery
◦ Upload your .js file
◦ Must use the ‘JavaScript Display Template’ content type
Web part page
◦ Web part – set the JS Link property
Demo
JS LINK WEB PART PROPERTY
Demo – JS Link
Before:
Standard All Items view of a Custom list and columns
Demo – JS Link
Create the js file – csr_overridable_demo1.js
Demo – JS Link
Add the js file to the Master Page Gallery
Change the content type to JavaScript Display
Template and complete fields
Demo – JS Link
On the list web part, add the address to the JS Link property:
◦ ~site/_catalogs/masterpage/csr_overridable_demo1.js
Demo – JS Link
After: See the updates
Notes, Trivia and Gotchas
Need to know and find the internal column names
◦ Click on the column name in the List Settings page
Adding columns using the edit grid
◦ Internal names created automatically
Demo 2 – JS Link
Use the item context
Demo 2 – JS Link
Before and After:
Simple, but just scratching the surface…
Demo 3 – JS Link
Call other function
Demo 3 – JS Link
Before and After:
Still simple, but going a little deeper and seeing more potential…
Demo 4 – JS Link
Item override
◦ Control over how the web part is rendered,
not just the individual fields
Demo 4 – JS Link
Before and After:
Client-Side Rendering Recap
Approaches
◦ [Crawl]
◦ [Walk]
◦ [Run]
Field overrides
Item overrides – Includes Headers and Footers
PreRender and PostRender overrides
Targeting
◦ BaseViewID
◦ ListTemplateType
Using SharePoint Designer
Can open and tweak in SharePoint Designer (SPD)
◦ Can also use Visual Studio, but Power Users likely won’t have access to VS.
Doesn’t display in the main ‘Master Pages’ site objects
◦ All Files -> _catalogs -> masterpage
Form Override Notes
SharePoint Designer Forms
◦ Default Forms – Use the ListFormWebPart and isn’t easily configurable. You do have JSLink and CSR Render
Mode.
◦ Custom-Created Forms (SPD) – Use the DataFormWebPart and can still be edited in SPD Code View or the XSL
on the Web Part properties. NO JSLink.
Display Templates
◦ DispForm.aspx
◦ EditForm.aspx
◦ NewForm.aspx
NOTE: JSLink override won’t work if form has been edited in SPD.
Quick Recap
Understand your toolset – new and existing OOB web parts and apps.
New Design Manager – Publishing Customizations
New App Model and Customization Approaches
Client-Side Rendering (CSR) – Start with JS Link
◦ See what develops in the coming months: practical best practices, patterns, etc.
Try It Yourself!
Play with many of these features in Office365
◦ http://www.microsoft.com/office/preview/en/whats-new
References
JS Link Primer – Blog Post
http://www.idubbs.com/blog/2012/js-link-for-sharepoint-2013-web-partsa-quick-functional-primer/
Microsoft: “Use as out-of-box whenever possible…”
http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1012
Customize a list view in apps using client-side rendering. (similar pieces to customizing list views)
http://msdn.microsoft.com/en-us/library/jj220045(v=office.15).aspx
http://msdn.microsoft.com/enus/library/microsoft.sharepoint.client.listtemplatetype(v=office.15).aspx
References
Creating a New Color Palette
http://www.estruyf.be/blog/creating-a-new-color-palette-for-a-sharepoint-2013-composedlook/
SharePoint 2013 First Look for Power Users – Asif Rehmani (MVP)
https://store.vook.com/storefronts/book/sharepoint-2013-first-look-for-powerusers.html#.UHxqZLgo5mN
Lightning Tools – Data Viewer Web Part
http://lightningtools.com/products/data-viewer-web-part/
SharePoint 2013 Information Worker Book Giveaway
Examines product functionality alongside realistic
scenarios to provide you with contextual relevance
Addresses managing permissions, reporting in
SharePoint, and working with access services
Offers updated content on working with lists, libraries,
workflow, content types, and web parts
Reviews social features, forms management, business
connectivity services, and more
SharePoint 2013 Information Worker Book Giveaway
Uses real-world examples to walk through SharePoint
solutions from concept through construction
Analyzes business needs and aligns them with
SharePoint capabilities
Step-by-step walk-through of solutions for SharePoint
information workers and power users
Thank You!
Special thanks to:
◦
◦
◦
◦
Raymond Mitchell @iwkid
Phil Jirsa @pjirsa
Jon Campbell (Microsoft) @MSFT_joncamp
Kirk Evans (Microsoft) @kaevans
Download