sp24 my site_branding

35
MySite, Branding Sonja Madsen Denmark, GMT+1:00 April 16 th /17 th , 2014

Upload: sonja-madsen-sharepoint-mvp

Post on 08-May-2015

320 views

Category:

Internet


1 download

DESCRIPTION

How to brand MySite and how to provision branding to personal MySite on Office 365 I won't show you the code, but I'll use MySiteBranding web part as example of what does it take to provision the custom master page and theme to personal MySite site collection for each user. The code that provisions the master page is written in JavaScript. MySiteBranding app is a SharePoint hosted app that is available for purchase at Office App Store. The MySiteBranding app and web part are installed on MySite host, the code provisions the master page to another site collection - to personal MySite.

TRANSCRIPT

Page 1: Sp24 my site_branding

MySite, Branding

Sonja MadsenDenmark, GMT+1:00April 16th /17th, 2014

Page 2: Sp24 my site_branding

Developer/Architect/Consultant

10 years with SharePoint

SharePoint MVP

Speaker

Microsoft partner and vendor

Sonja MadsenOwnerSONJASAPPSCopenhagenDenmark

Contact

@[email protected]

Page 3: Sp24 my site_branding

Set custom theme and master page to MySite Host Provision custom theme and master page to personal MySite

MySite, Branding

Page 4: Sp24 my site_branding

MySite Host: Set theme and custom master page

Personal MySite: Provisioning theme

and custom master page

MySite, Branding

Page 7: Sp24 my site_branding

”About me” is the key page

Tags And Notes

About meIntranet

Page 8: Sp24 my site_branding

Title: MySite Personal Upgrade On NavigationDescription: Creates or upgrades a user's personal site upon navigation to the My Site Host site.

Page 9: Sp24 my site_branding

”About me” is a key page

Hidden web part

Out-of-box SharePoint – Best Practice

Page 11: Sp24 my site_branding

Answer: Hidden web part

JavaScript (ADFS, Hosting) = No prompt from hidden web part

How to provision master page and theme

Page 12: Sp24 my site_branding

What to do first?

About meIntranet

Tags And Notes

Page 13: Sp24 my site_branding

Set custom theme and master page

Provision custom theme and master page

MySite Branding Plan

About me

Tags And Notes

Page 14: Sp24 my site_branding

Hidden links in Site Settings

Links are hidden, pages are still available

MySite Host

Page 16: Sp24 my site_branding

1. Apply theme 2. Apply custom master page on MySite Host

Page 17: Sp24 my site_branding

One down, one to go.

Half way through!

Yess!!!

Page 19: Sp24 my site_branding

Users with READ access to MySite Host have FULL CONTROL access to their personal MySite

Personal MySite is another site collection

When do we want to apply branding

Code:Get custom master page and custom theme that are applied to MySite Host, or hardcode the valuesGet current user and personal MySite url, or hardcode the valuesCopy the custom master page and theme to personal MySiteApply theme Apply custom master page

Provisioning: What do we need to know

Page 20: Sp24 my site_branding

Most Users have READ access to MySite Host Is that a problem? Get current user Get current master page url Get current theme url Get current master page file Get current color palette and font scheme file

Page 21: Sp24 my site_branding

When to apply branding

Page 23: Sp24 my site_branding

var value = SP.Web.get_customMasterUrl ()

http://<sitecollection>/<site>/_api/web/customMasterUrl

var value = SP.Web.get_masterUrl ()

http://<sitecollection>/<site>/_api/web/masterUrl

var value = SP.Web.get_themeInfo ()

http://<sitecollection>/<site>/_api/web/themeInfo

Get custom master page and custom theme that are applied to MySite Host

Page 26: Sp24 my site_branding

var targetUser = SP.Web.get_currentUser ()

http://<sitecollection>/<site>/_api/web/currentUser

var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);

personProperties = SP.UserProfiles.PeopleManager.getMyProperties()

/_api/SP.UserProfiles.PeopleManager/GetMyProperties/PersonalUrl

Get current user and personal MySite url

Page 27: Sp24 my site_branding

Half way through!

Yess!!!

Page 28: Sp24 my site_branding

_api/web/getFileByServerRelativeUrl(themeFile)/$value“

var masterpage = new SP.FileCreationInformation()

getFolderByServerRelativeUrl(relUrl + "_catalogs/masterpage/")

Get and copy the custom master page and theme

Page 29: Sp24 my site_branding

SP.Web.applyTheme(colorPaletteUrl, fontSchemeUrl, backgroundImage, true);

SP.Web.set_masterUrl(relUrl + "_catalogs/masterpage/" + filename)

SP.Web.set_customMasterUrl(relUrl + "_catalogs/masterpage/" + filename)

Apply theme and set master page

Page 30: Sp24 my site_branding

What about the blog?

What about the hidden web part?

Anything Else?

Page 32: Sp24 my site_branding

Get theme

Get master page

When to apply branding

Pitfalls

Page 33: Sp24 my site_branding

Pages on MySite

Why do we want to brand MySite

”About me” is a key page

Hidden web part and JavaScript

MySite Host Settings and hidden links

How to get custom theme and master page url

How to get current user and personal site url

How to get and copy the files

Apply theme and set master page

Blog

JavaScript web part

Summary

Page 34: Sp24 my site_branding

@sonjamadsen

[email protected]

sp2013.blogspot.com

Sonja Madsen