Microsoft Office SharePoint DesignerMaster PagesHOL384.docx

上传人:b****4 文档编号:4695425 上传时间:2022-12-07 格式:DOCX 页数:28 大小:318.73KB
下载 相关 举报
Microsoft Office SharePoint DesignerMaster PagesHOL384.docx_第1页
第1页 / 共28页
Microsoft Office SharePoint DesignerMaster PagesHOL384.docx_第2页
第2页 / 共28页
Microsoft Office SharePoint DesignerMaster PagesHOL384.docx_第3页
第3页 / 共28页
Microsoft Office SharePoint DesignerMaster PagesHOL384.docx_第4页
第4页 / 共28页
Microsoft Office SharePoint DesignerMaster PagesHOL384.docx_第5页
第5页 / 共28页
点击查看更多>>
下载资源
资源描述

Microsoft Office SharePoint DesignerMaster PagesHOL384.docx

《Microsoft Office SharePoint DesignerMaster PagesHOL384.docx》由会员分享,可在线阅读,更多相关《Microsoft Office SharePoint DesignerMaster PagesHOL384.docx(28页珍藏版)》请在冰豆网上搜索。

Microsoft Office SharePoint DesignerMaster PagesHOL384.docx

MicrosoftOfficeSharePointDesignerMasterPagesHOL384

Hands-onLabOverview

1.Introduction

HOL384:

MicrosoftOfficeSharePointDesigner2007–MasterPages

2.TechnologiesHighlighted

∙Microsoft®Windows®SharePoint®Services3.0

∙Microsoft®OfficeSharePoint®Designer2007

∙MasterPages

3.Audience

ITPro–300level

4.Scenario

ThislabwillcoverseveraltypesofMasterPagecustomizationavailableinMicrosoftOfficeSharePointDesigner2007startingwithaddingglobalsitelinksandcopyrightinformationtoamasterpageandmovingtodesigningaMasterPagefromthegroundup.

5.PurposeofHands-onLab

ThislabwillexplainthedifferenttypesofMasterPagesthatMicrosoftOfficeSharePointDesigner2007isabletoutilize,aswellashowtodesignanewMasterPageforSharePoint.

Hands-onLab

DiscussionPoints

Actionstaken

UsingMicrosoftOfficeSharePointDesigner2007toCustomizeSharePointMasterPages

Thissectionwillcoverbasiccustomizationsofmasterpages.

Setup

∙Login,usingthefollowingcredentials:

∙Logon:

administrator

∙Password:

pass@word1

∙WaitfortheWarmupscripttocompleteandclose

AddGlobalLinkstoMasterPage

Inthissection,corporatelinkswillbeaddedtothetopnavigationbarofaSharePointsitebyeditingaMasterPage.

OfficeSharePointDesigner2007usersmaynoticethatwhentheyclickandtrytomodifycertainpartsofaWebPartpagetheyareunabletoso.ThisisbecausethatcontentisnotactuallypartoftheWebPartitisdefinedbythemasterpageitreferences.Thebasicconceptbehindmasterpagesistocreatethelayoutforanapplicationinonefile.Thelayoutdefinesspecificareas(ContentPlaceHoldercontrols)thatpagesthatusethemasterpagecanaddcontentto.TheindividualcontentpagesthenreferencethemasterpageandaddcontenttoContentcontrolswhichreferencethemasterpage’sContentPlaceHoldercontrols.Thisreducesdevelopmenttimeanderrorsbyeliminatingtheneedtoreproducethelayoutcodeoneachpage.AsitehasoneDefaultMasterPagesetting.EachSharePointsitedefinitionincludesadefault.masterfilewhichissetastheDefaultMasterPagesetting.TheindividualWebPartpagessuchasdefault.aspxandAllItems.aspxineachlistreferencethismasterpage.

InMOSSthereisanotherimportantmasterpagesetting,CustomMasterPage.TheCustomMasterPageisusedinpublishingpageslocatedinasite’sPagesdirectory.

∙InSharePointDesigner,openthesiteifitisnotalready

∙IntheFolderListtaskpane,expandthe_catalogdirectorythenexpandmasterpage(MasterPageGallery)subdirectory,doubleclickondefault.master

∙ClickYesbuttonintheCheckoutdialogifitpopsup

∙OpenaFindandReplacedialogbyhittingCRTL+F

∙IntheFindandReplacedialog,typeGlobalSiteLink2intheFindwhattextboxandclickFindNext

∙Movethecursorinfrontoftheparentclosingtrtag()oftheGlobalSiteLink2DelegateControl.TheHTMLshouldlikesimilartothis(withthetargettrtaghighlighted):

DelegateControlControlId="GlobalSiteLink1"Scope="Farm"runat="server"/>

DelegateControlControlId="GlobalSiteLink2"Scope="Farm"runat="server"/>

∙GototheendofthelineandhitEnterbutton

∙Typeorcopy/pastethefollowingtoaddaHelpDesklink:

3px'>

//helpdesk">HelpDesk

4px;padding-right:

3px'>|

∙Theresultoftheeditshouldlooksimilartothefollowing:

DelegateControlControlId="GlobalSiteLink1"Scope="Farm"runat="server"/>

DelegateControlControlId="GlobalSiteLink2"Scope="Farm"runat="server"/>

3px'>

//helpdesk">HelpDesk

4px;padding-right:

3px'>|

∙[Optional]AddthefollowingHTMLbeforetheclosingtrtagtoaddCorporateDirectoryandTermsofUselinks

3px'>

//terms">TermsofUse

4px;padding-right:

3px'>|

3px'>

//directory">CorporateDirectory

4px;padding-right:

3px'>|

∙SavethefilebyhittingCtrl+S

∙IntheFolderListtaskpane,rightclickonAdvWorks.aspxandselectPreviewinBrowser

∙NoticethenewHelpDesklink(TermsofUseandCorporateDirectoryifstep10wascompleted)atthetopofthepage

∙Closethebrowser

AddCopyrightNoticetoMasterPage

Thissectionshowshowtoaddacopyrightnoticetothebottomofallofasite’spagesbymodifyingthesite’sdefaultmasterpage.

Thetext©inHTMLproducescopyrightsymbol(©).

TheaspnetisabasicSharePointTeamSite.IfSharePointPublishingfeatureswereenabled,thesite’scustommasterpagewouldalsohavetobeeditedorthenewdefault.masterpagewouldhavetobesetthecustommasterpageofthesite.

InsiteswiththeSharePointPublishingfeatureenabled(availableonMOSSservers)theDefaultandCustomMasterPagesettingscanalsobesetintheSiteMasterPageSettingspage(accessiblefromtheSiteSettingspage).Thepage’sSiteMasterPagesettingcorrespondstothesite’sCustomMasterandtheSystemMasterPagecorrespondstoDefaultMaster.Themasterpagedropdownlistsarepopulatedfromthemasterpagecataloginrootsiteofthesitecollection.

Note:

Theerrormessage“Thesitemasterpagesettingcurrentlyappliedtothissiteisinvalid.Pleaseselectanewmasterpageandapplyit”frequentlyshowsuponthispage.Itisapotentialbugandjustignoreit.

Pagesinthe_layoutsdirectorydonotreferenceDefaultorCustomMaster.Theyusespecialmasterpagesinthe_layoutsdirectory.Modifyingmasterpagesinthe_layoutsdirectoryisnotsupported.

∙IntheFolderListtaskpane

∙Rightclickondefault.masterandselectCopy

∙Rightclickonmasterpage(MasterPageGallery)andselectPaste

∙RightclickonCopyofdefault.masterandselectRename

∙Typecopyright.masterandhitEnter

∙OpentheFindandReplacedialog,byhittingCRTL+F

∙IntheFindandReplacedialog,enterPlaceHolderMainintheFindwhattextboxandclickFindNext

∙Movethecursortoafterthenextclosingtrtag()andhitEnter

∙Typeorcopy/pastethefollowingtext:

bottom;text-align:

center">

�Allrightsreserved.

∙Afterthechangesthesectionshouldlooksimilartothefollowing:

ContentPlaceHolderid="PlaceHolderMain"runat="server">

ContentPlaceHolder>

bottom;text-align:

center">

�Allrightsreserved.

∙SavethefilebyhittingCrtl+S

∙IntheFolderListtaskpane,rightclickcopyright.masterandselectSetasDefaultMasterPage

∙IntheFolderListtaskpane,doubleclickAdvWorks.aspx

∙SavethefilebyhittingCrtl+S

∙IntheFolderListtaskpane,rightclickAdvWorks.aspxandselectPreviewinBrowser

∙Noticethecopyrightnoticeatthebottomofthepage

∙Closethebrowser

CreateaMasterPagefromaBlankMaster

Inthissectionanewmasterwillbecreatedfromablankmasterpage.

Asdiscussedearlier,SharePointmasterpagesdefineContentPlaceHoldercontrolsthatsetwherepagesinheritingthemasterpagecanaddcontent.ThemasterpagesthatyoudesignmustdeclarethesameContentPlaceHoldercontrols.Ifyourmasterpagelacksthesecontrols,youmayencountererrorswhenchildpagesattempttoaddcontenttothem.FormoreinformationabouttheContentPlaceHoldercontrolsthatmustbedeclaredinallSharePointmasterpagesvisit

Anytimethepromptwarningthatwithoutmatchingcontentregionsthechildpageswillbreakappearsdoublecheckthemasterpagebeforesettingitasthedefault.

Inthissectioncodewillbecopiedfromdefault.mastertothenewlitware.mastertospeedtheprocessandtoavoidmistakes.CopyingneededcontentfromanexistingworkingSharePointmasterpageisthemostreliableandleasterrorpronemethodforcreatinganewmasterpage.

Importantchildelements/controlsoftheheadtag.

ContentPlaceHolderid=PlaceHolderPageTitlerunat="server"/>

∙Thetitleelementofthepagewhichdisplaysinthetitlebarofthebrowser.ThePlaceHolderPageContentPlaceHoldercontrolisreferencedbyaContentcontrolintheinheritingpagewherethetitleisset.

CssLinkrunat="server"/>

∙Addthereferencetothecore.cssfilethathasthebasecssclassesusedinallpagesinSharePoint.Othercssfilescaneasilybeincludedwhiledefiningpages,butitisimportantthatthiscontrolremainsonthepageaschildcontrolssuchasWebPartswillstillcontinuetousecssclassesdefinedinthisfile.

Themerunat="server"/>

∙Addareferencetothecurrenttheme’scssfiletothepage.

ScriptLinklanguage="javascript"name="core.js"Defer="true"runat="server"/>

∙Addsreferencecore.jstothepage.Core.jscontainsSharePoint’sbasicjavascriptfunctions.

CustomJSUrlrunat="server"/>

∙Addsth

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1