Sitecore Intranet Portal 3.3 Developer's Guide

Transcription

Sitecore Intranet Portal 3.3Developer's Guide Rev: 2012-01-26Sitecore Intranet Portal 3.3Developer's GuideThe Quick Start Guide and Configuration Reference for Administrators and DevelopersSitecore is a registered trademark. All other brand and product names are the property of their respective holders. Thecontents of this document are the property of Sitecore. Copyright 2001-2012 Sitecore. All rights reserved.

Sitecore Intranet Portal 3.3 Developer's GuideTable of ContentsTable of Contents . 2Chapter 1 Sitecore Intranet Portal Administrator’s Default Credentials . 5Chapter 2 Site Config Settings . 62.1Configuration Items . 72.1.1 Settings . 72.1.2 Locations . 82.1.3 Portal . 82.2System Folders . 10Chapter 3 User Administration . 113.1Profiles . 123.1.1 Automatically Creating and Updating User Profiles . 123.1.2 Manually Creating User Profiles . 123.2Setting Security for User Profiles . 143.2.1 Default Security Settings . 143.2.2 Resetting Security Permissions for every User Profile . 143.2.3 Main Sitecore Intranet Portal Roles . 143.3Editing User Profiles . 163.3.1 Allowing Employees to Edit their User Profiles . 163.3.2 Adding Fields to User Profiles . 17Adding Fields to Intranet.Employee.xslt . 17Making Fields Searchable in the Phonebook and Pager . 173.4Extending the Portal . 183.4.1 Active Directory Integration . 183.4.2 Setting Location, Department and Canteen Automatically . 18Chapter 4 Skinning . 194.1Skins. 204.1.1 Changing Skins . 204.1.2 Department and Location Based Skins . 214.1.3 Customizing Icons and Images . 214.1.4 Changing the Logo . 224.1.5 Changing the Top Right-hand Picture . 234.1.6 Customizing the Icons at the Top of the Page . 234.1.7 Customizing the Login Page . 244.1.8 Creating a Custom Skin . 254.2Customizing Style Sheets . 264.2.1 Referencing Skin Images from CSS Files . 294.3Developer Hints . 304.3.1 Dynamic Image Scaling . 304.3.2 Using Skinned Images in XSLT Files . 30Chapter 5 Web Parts . 315.1Web Parts Configuration . 325.1.1 Security and Rights Management . 335.2Standard Web Parts . 345.2.1 RSS Web Part . 355.3Web Parts, Sublayouts and Web Controls . 365.3.1 Example: Using a sublayout as a Web part . 365.3.2 Example: Creating Web Parts Based on the Web Part Template . 375.4Extending the Portal. Creating Your Own Web Parts . 395.5Extending the Portal. Using SharePoint Web Parts . 42Chapter 6 Search . 436.1Configuring Indexing for PDF Files and Office Documents . 446.2Customizing the Way Search Results are Displayed . 45Chapter 7 Editing Using the Page Editor . 467.1Creating and Editing Content . 47Sitecore is a registered trademark. All other brand and product names are the property of their respective holders. Thecontents of this document are the property of Sitecore. Copyright 2001-2012 Sitecore. All rights reserved.Page 2 of 89

Sitecore Intranet Portal 3.3 Developer's Guide7.1.1 Editing Additional Fields . 487.2Managing Permissions for Page Editor Features . 50Chapter 8 Multilanguage Features . 518.1Layered Translations . 528.2Content Area vs. Menu Area . 538.2.1 Language Behavior in the Menu Area . 538.2.2 Language Behaviour in the Content Area . 538.3Working with Different Languages . 558.3.1 The Language Selector . 558.3.2 Editing Multilanguage Content . 558.3.3 Corporate Language and CorporateTitle field . 56Changing the Corporate Language . 578.3.4 Adding a CorporateTitle Field to Custom Templates . 578.3.5 Toggle Visibility of CorporateTitle for Specific Templates . 578.4Working with the Localized Placeholder . 588.4.1 Using the LanguageResolver Outside the Localized Placeholder . 588.5Adding and Removing Languages . 598.5.1 Adding a New Language . 598.5.2 Removing the English Language . 598.5.3 Removing the Language Selectors . 598.6Security and Languages . 60Chapter 9 Data Channeling. 619.1Target Groups . 629.1.1 Setting Security for Target Groups. 629.1.2 Tagging Content with Target Groups . 629.1.3 Setting Up Templates to Use the Data Channel Framework . 639.2Filtering . 649.2.1 Adding/Removing the Filtering Control on Lists . 649.2.2 Using DCF for Custom Renderings and Sublayouts . 649.3How to Disable the Data Channel Framework . 66Chapter 10File Drop Area . 6710.1 Attachments and the File Drop Area . 6810.1.1Enabling the File Drop Area Field . 6810.1.2Modifying the Views . 6810.1.3Managing Attachments . 68Using the Silverlight File Drop Area Control . 69Changing the Drag and Drop Window . 6910.1.4The Fallbackview Parameter . 6910.1.5Searching Attachments Shared Between Languages . 70Chapter 11RSS Feeds . 7111.1 Disabling RSS Feeds on an Intranet Site . 7211.2 Modifying Intranet Portal RSS Feeds . 7311.2.1The Feed Entry Content Field . 7311.3 Content Item Feeds . 7511.3.1Subscribing to a Content Item RSS Feed . 75Using the Content Item RSS Feed . 76Chapter 12Draft Mode . 7712.1 Draft Versions. 7812.1.1The Draft Workflow. 7812.1.2Who is the Author of the Draft Version. 7812.2 Enabling Draft Mode . 7912.3 Creating a Draft Workflow . 80Chapter 13Other Features . 8113.1 Converting between the Rich Text and Word Field Types . 82Chapter 14Developer’s Notes . 8314.1 Dates . 8414.1.1Automatically Setting Date or Datetime Fields to Today’s Date or Current Timestamp8414.1.2Date Formatting and Parsing . 84Sitecore is a registered trademark. All other brand and product names are the property of their respective holders. Thecontents of this document are the property of Sitecore. Copyright 2001-2012 Sitecore. All rights reserved.Page 3 of 89

Sitecore Intranet Portal 3.3 Developer's Guide14.1.3Changing Date Format . 8414.2 XSLT . 8514.2.1Methods to Retrieve the Most Important Items in XSLT . 8514.2.2XSLT Controls and Extensions . 85Isfieldvisible . 85Longdate . 85Shortdate . 8514.3 Styles . 8614.3.1Word Field Styles . 8614.4 Search . 8714.4.1Customize Search Output . 8714.5 Draft Mode. 8814.5.1IntranetItemProvider Class . 8814.5.2DraftModeDisabler Class . 8814.6 Side Menu . 8914.6.1Adding Side Menu Item Using API . 89Sitecore is a registered trademark. All other brand and product names are the property of their respective holders. Thecontents of this document are the property of Sitecore. Copyright 2001-2012 Sitecore. All rights reserved.Page 4 of 89

Sitecore Intranet Portal 3.3 Developer's GuideChapter 1Sitecore Intranet Portal Administrator’s DefaultCredentialsAs an administrator or developer you will work with various Sitecore Intranet Portal (SIP) installations.Here are the default administrator’s credentials:SIP installationUser NamePasswordDemo site (Norman Furniture)adminbClean SIP 3.1adminbSitecore is a registered trademark. All other brand and product names are the property of their respective holders. Thecontents of this document are the property of Sitecore. Copyright 2001-2012 Sitecore. All rights reserved.Page 5 of 89

Sitecore Intranet Portal 3.3 Developer's GuideChapter 2Site Config SettingsThis chapter describes the Site Config configuration item and the configurationoptions it provides including the Frontpage portal setup, Target Groups, ActivityTypes and the Skin setup.This chapter contains the following sections: Configuration Items System FoldersSitecore is a registered trademark. All other brand and product names are the property of their respective holders. Thecontents of this document are the property of Sitecore. Copyright 2001-2012 Sitecore. All rights reserved.Page 6 of 89

Sitecore Intranet Portal 3.3 Developer's Guide2.1Configuration ItemsThis section describes three configuration items: Settings, Locations and Portal. These items arelocated under the Site config item:2.1.1SettingsThe Settings item allows you to switch quickly between different presets. It contains the followingsettings:SkinThe “skin” of the site defines how it looks. For more information about skins in Sitecore Intranet Portal,see Chapter 4, Skinning. The Skin settings are described in detail in the separate SIP Skin Settingsdocument.MainSettingsThis field contains the definition of the main settings. Setting are located under the/system/IntranetSettings/MainSettings/ item. The main settings are described in detail inthe separate SIP Main Settings document. To read this document, visit the Sitecore DevelopersNetwork.WeblogSettingsThe global settings for blogs include date/time format, notification sender email, button titles and soon. The Weblog se

Sitecore Intranet Portal 3.3 Developer's Guide Sitecore is a registered trademark. All other brand and pr