Module 6Extending Web Content Management.docx
《Module 6Extending Web Content Management.docx》由会员分享,可在线阅读,更多相关《Module 6Extending Web Content Management.docx(20页珍藏版)》请在冰点文库上搜索。
![Module 6Extending Web Content Management.docx](https://file1.bingdoc.com/fileroot1/2023-7/7/53f5987b-ac24-48ae-86dd-564276643ce9/53f5987b-ac24-48ae-86dd-564276643ce91.gif)
Module6ExtendingWebContentManagement
Module6:
ExtendingWebContentManagement
Datepublished:
February2009
Summary:
ThismoduledescribeshowtocustomizeMicrosoft®OfficeSharePoint®WebContentManagementsothatyoucanincludecustomizationsinsolutionarchitectures.
SeeWebContentManagementTrainingModules(foracompletelistoftheavailabledownloads.
TheinformationcontainedinthisdocumentrepresentsthecurrentviewofMicrosoftCorporationontheissuesdiscussedasofthedateofpublication.BecauseMicrosoftmustrespondtochangingmarketconditions,itshouldnotbeinterpretedtobeacommitmentonthepartofMicrosoft,andMicrosoftcannotguaranteetheaccuracyofanyinformationpresentedafterthedateofpublication.
ThisWhitePaperisforinformationalpurposesonly.MICROSOFTMAKESNOWARRANTIES,EXPRESS,IMPLIEDORSTATUTORY,ASTOTHEINFORMATIONINTHISDOCUMENT.
Complyingwithallapplicablecopyrightlawsistheresponsibilityoftheuser.Withoutlimitingtherightsundercopyright,nopartofthisdocumentmaybereproduced,storedinorintroducedintoaretrievalsystem,ortransmittedinanyformorbyanymeans(electronic,mechanical,photocopying,recording,orotherwise),orforanypurpose,withouttheexpresswrittenpermissionofMicrosoftCorporation.
Microsoftmayhavepatents,patentapplications,trademarks,copyrights,orotherintellectualpropertyrightscoveringsubjectmatterinthisdocument.ExceptasexpresslyprovidedinanywrittenlicenseagreementfromMicrosoft,thefurnishingofthisdocumentdoesnotgiveyouanylicensetothesepatents,trademarks,copyrights,orotherintellectualproperty.
©2009MicrosoftCorporation.Allrightsreserved.
Microsoft,SharePoint,VisualStudio,andWindowsaretrademarksoftheMicrosoftgroupofcompanies.
Allothertrademarksarepropertyoftheirrespectiveowners.
TableofContents
Module6:
ExtendingWebContentManagement1
Module6Overview1
Objectives1
Lesson1:
CustomizingContentPresentation1
Objectives1
CreatingaCustomFieldControl1
FieldTypesandFieldControls2
CreatingaCustomFieldControl2
DeployingCustomFieldControls2
CustomizingNavigation3
Built-inNavigationControls3
NavigationModel4
CreatingaCustomNavigationControl4
WhentoConsideraCustomNavigationControl4
WorkingwithSiteMapProviders5
ConsiderationsforDevelopers5
CustomizingtheSiteVariationRedirectionLogic5
DefaultSiteVariationLogic6
HowDevelopersModifytheSiteVariationRedirectionLogic6
UsingtheVariationNavigationControl7
Lesson2:
CustomizingContentEditing7
Objectives7
CustomizingthePageEditingToolbar7
FacilitiesonthePageEditingToolbar8
HowtoCustomizethePageEditingToolbar8
CustomizingtheHTMLEditorFieldControl8
ControllingEditorActions9
ControllingTableFormats9
AddingExtraButtons10
Lesson3:
CustomizingContentDeployment10
Objectives10
CapabilitiesoftheContentDeploymentandMigrationAPI11
ExportingOfficeSharePointContent11
SpecialFeatures11
ImportingContent12
CustomContentDeploymentScenarios13
ReviewofModule613
Module6Overview
Asthearchitect,youmightfindthatyourorganizationhasunusualoruniqueWebContentManagement(WCM)requirementsthatrequirecustomizationofMicrosoft®OfficeSharePoint®ProductsandTechnologies.YoucancustomizemanyaspectsofOfficeSharePointWCMtosuityoursituation.Forexample,youcancreatecustomcontrolsforpresentingandeditingitemsonyourpages.
ThismoduledescribesthewaysinwhichyoucancustomizeOfficeSharePointWCMsothatyoucanincludecustomizationsinsolutionarchitectures.
Objectives
Aftercompletingthismodule,youwillbeableto:
∙DescribehowdeveloperscancustomizethewayOfficeSharePointProductsandTechnologiespresentcontenttositevisitors(Lesson1)
∙DescribehowdeveloperscanchangethewaythatuserseditcontentinOfficeSharePointsites(Lesson2)
∙IncludecustomcontentpresentationinWCMsolutionarchitecture(Lesson3)
Lesson1:
CustomizingContentPresentation
OfficeSharePointProductsandTechnologiesincludeversatilefacilitiesthatpresentdatatositevisitors.Youcanoftencreatethesitethatyouwantbyusingthesefacilitieswithoutanycustomization.However,forthosewithunusualoruniquerequirements,OfficeSharePointprovidesseveralopportunitiestocustomizecontentpresentation.
Objectives
Aftercompletingthislesson,youwillbeableto:
∙Describecustomfieldcontrolsandsituationsinwhichyoushouldconsidercreatingthem
∙ListthealternativenavigationcontrolsandprovidersthatOfficeSharePointProductsandTechnologiesinclude
∙Understandhowdeveloperscreatecustomnavigationcontrols
∙Describesituationsinwhichyoushouldconsidercustomizingthesitevariationredirectionlogic
CreatingaCustomFieldControl
YoucanstoremanytypesofdatainOfficeSharePointProductsandTechnologiesWCMsolutionsbyselectingappropriatefieldtypes.EachfieldtypeisrenderedonaWebpagebyafieldcontrol.Occasionally,youmightrequireacustomfieldtypeinyoursiteandinthatcaseyoushouldplanacustomfieldcontroltodisplayyourdatatousers.
Thissectioncontainsthefollowingtopics:
∙FieldTypesandFieldControls
∙CreatingaCustomFieldControl
∙DeployingCustomFieldControls
FieldTypesandFieldControls
Developerscreatecustomfieldtypesandcustomfieldcontrolsbywritingmanagedcode.Customfieldtypesandcontrolscanextendthefunctionalityofbuilt-infieldsandcontrols.
Beforeyouplanforacustomfieldtypeandacustomfieldcontrolinyourarchitecture,considerfirstwhetheryoucansatisfyyourrequirementsbyusingabuilt-infieldtype.Forexample,tostoreapostaladdressyoumightuseamultilinetextfield.
Considerusingacustomfieldtypeinthefollowingcircumstances:
∙Similardataappearsmanytimesthroughoutyoursite,oracrossmultiplesites.Youcanreusecustomfieldtypestomaximizethereturnoninvestmentincustomcode.
∙Yourequirecustomdatavalidation.Youcanbuilddatavalidationintoyourcustomfieldtypetoensurethatusersentersensible,validdata.
∙Thebuilt-incontrolsdonotdisplaydatatoyoursatisfaction.Youhaveprecisecontroloverthedisplayofdatawhenyoucreateacustomfieldcontrol.
CreatingaCustomFieldControl
Whenadevelopercreatesacustomfieldtypeandacustomfieldcontrol,theymust:
∙CreateaclasslibraryprojectintheMicrosoft®VisualStudio®2005orMicrosoft®VisualStudio®2008developmentsystem.Thiskindofprojectcompilesintoa.dllfile.
∙Addacustomfieldtypetotheproject.Thecustomfieldtypeisaclassthatextendsoneofthebuilt-infieldtypes.Thedevelopercanextendthebuilt-infieldtypebyoverridingmethods.Forexample,toaddcustomdatavalidation,thedevelopercouldoverridetheGetValidatedStringmethod.
∙Addacustomfieldcontroltotheproject.Thecustomfieldcontrolisaclassthatextendsoneofthebuilt-infieldcontrols.Thedevelopercancustomizethedisplayofinformationbyoverridingmethods.
∙Createafieldtypedefinitionfile.ThefieldtypedefinitionfileisanXMLfilethatcontainsinformationthattheOfficeSharePointserverusestoinstantiateandrunthefieldtype.
DeployingCustomFieldControls
Whenthedeveloperhascompletedandcompiledthefieldcontrolandfieldtype,youmustcompletethefollowingstepstodeploythem(ideallythoroughanOfficeSharePointsolution):
►Deploythecustomfieldcontrols
1.Installthe.dllfileintotheGlobalAssemblyCache(GAC)onallthefront-endWebserversinyourserverfarm.
2.Copythefieldtypedefinitionfiletothefollowinglocation:
C:
\ProgramFiles\CommonFiles\MicrosoftShared\webserverextensions\12\TEMPLATE\XML
3.AddatagtotheWeb.configfilesfortheappropriateWebapplicationsforthecustomfieldcontrol.
CustomizingNavigation
AclearnavigationdesigniscrucialtoallWebsitesbecauseitenablesuserstolocateinformationrapidlyandintuitively.Forthisreason,youmightwanttocustomizethewaythatOfficeSharePointProductsandTechnologiesformulateandpresentnavigationinformation.Thefollowingtableshowsaspectsofnavigationcustomization.
Aspect
Details
Built-innavigationcontrols
Global
Current
Breadcrumb
Summarylinks
Treeview
Contentbyquery
Navigationmodel
Datasources
Sitemapproviders
Navigationcontrols
Built-inNavigationControls
ThenavigationcontrolsbuiltintoOfficeSharePointProductsandTechnologiesprovideadvancedfunctionalityandagreatdealofflexibility.Theyshouldbecarefullyconsideredbeforeyouconsiderincludingacustomnavigationsolutioninyourarchitecture.Thecontrolsareasfollows:
∙Globalnavigationcontrol:
Appearsastoplinkbarsortabsindefaultsitetemplates.Administratorscanspecifywhatisdisplayedhere.Bydefault,thecontroldisplaysallsubsitesonelevelbelowthetop-levelsite.ThisnavigationisimplementedwiththeOfficeSharePointmenucontrolthatyoucanusetocreateothernavigationelements.
∙Currentnavigationcontrol:
AlsoknownastheQuickLaunchanddisplayedontheleftindefaultsitetemplates.Administratorscanextensivelycontrolitscontent.Forexample,theycanselectwhetherthenavigationdisplaysamenuoratreeviewofthesite.
∙Breadcrumbnavigationcontrol:
Displaystheuser’scurrentpositioninthesitehierarchy,withlinkstoallhigherlevels.
∙Treeviewcontrol:
Displaysahierarchyofthesite.Youcanconfigurethenumberoflevelstoshowandmakeotheradjustments.
∙ContentQueryWebPart:
Displaysad