Amazing Books
Temporary Blank

Monday, April 18, 2011

Advanced Microsoft Content Management Server Developments

Table of Contents
Introduction 1
Chapter 1: Building CMS Explorer 5
A Central Administrative Tool: CMS Explorer 5
Creating the Workspace 7
The Four MCMS Publishing Modes 8
Determining the Current Publishing Mode 8
Changing the MCMS Publishing Mode 9
The Ugly URL Querystring Specifies the Publishing Mode 9
Toggling Modes with CmsHttpContext 10
Toggling Modes with CmsApplicationContext 11
Adding Querystring Parameters to the URL with CmsHttpContext.PropagateParameter() 13
Specifying the Parent Container 14
Rendering Collections in a DataGrid 16
Displaying Only Selected Properties in the DataGrid 17
Considerations for Template Galleries and Resource Galleries 18
Adding Custom Columns to the DataGrid 19
Building an Edit Menu 21
Building the Toolbar 25
The Up Button 26
The Refresh Button 27
The DropDownList 27
The Channels Button 30
The Templates Button 30
The Resources Button 31
The Completed User Interface 31
Using Reflection to List Properties and their Values 31
Updating Property Values 35
Summary 38
Chapter 2: Managing Channels and Postings with the PAPI 39
Managing Channels and Postings 39
Creating Channels 39
Validating Names 43
Testing the Create Channel Dialog 45
Creating Postings 46
Connected Postings 50
Copying Postings 54
Moving Postings 57
Summary 60
Chapter 3: Managing Templates, Template Galleries, and Resources 61
Managing Template Galleries and Templates 61
Creating Template Galleries 61
Creating Templates 65
Submitting the Template 68
Creating Custom Property Definitions 70
Creating Placeholder Definitions 71
Creating Connected Templates 73
Copying Templates 78
Moving Template Galleries and Templates 82
Managing Resources 86
Creating Resources 86
Replacing Resources 91
Deleting Objects 94
Summary 97
Chapter 4: Preparing Postings for Search Indexing 99
Influencing Search Engines with the ROBOTS META Tag 100
The RobotMetaTag Control and Channel Rendering Scripts 101
Outputting META Tags 103
Using <%= %> within Template Files 104
Pulling META Tag Content from Custom Properties 104
Configuring Templates to Allow Postings to Return Accurate Last
Modified Time 106
Dealing with Output Caching 108
Increasing Search Accuracy by Generating Search Engine Specific Pages 108
Interrogating the User Agent 109
Hiding Navigational Elements 110
Creating a Posting/Channel Listing User Control 110
Tips for Search Engine Optimization 111
Design and Navigation Considerations 111

Adding Details to the Title Tag 111
Using META Tags 112
Summary 112
Chapter 5: Searching MCMS with SharePoint 113
MCMS Search Options 113
Microsoft SharePoint Portal Server Search 114
Preparing the MCMS Site for Indexing 115
Disabling Channel Names to Host Header Names Mapping 115
Assigning a Search Account 116
Enable Guest Access for Tropical Green 117
Output Caching and Last-Modified Dates of Postings 118
The Connector SearchMetaTagGenerator Control 119
Configuring SharePoint Portal Server Search 121
Creating a New Content Source 122
Creating a Content Source with the MCMS Connector Utility 122
Creating a Content Source Manually 125
Search Rights for the MCMS Application Pool Account 128
Adding a Search Page to the MCMS Site 129
Searching with the MCMS SharePoint Connector 130
Building a Custom Search Implementation 135
About the SharePoint Portal Server Query Service 135
Building a Search Input Control 135
The Advanced Search and Results Page 137
Summary 150
Chapter 6: Publishing Content Between MCMS and SharePoint 151
Using MCMS and SharePoint Together 152
Joining MCMS and SharePoint in a Single Solution 153
Using SharePoint to Display MCMS Content 155
The MCMS Connector for SharePoint Technologies 156
Installing the MCMS Connector Web Parts 157
MCMS Page Listing Web Part 158
The MCMS Pages in Production Web Part 166
The MCMS Pages Waiting for Approval Web Part 167
Limitations of the MCMS Connector for SharePoint 168
Using MCMS to Display SharePoint Content 169
The MCMS Connector for SharePoint Technologies 169
Using the SharePoint Document Placeholder 170
Limitations of the MCMS Connector for SharePoint 178
A Placeholder Control to Display SharePoint List Contents 179
Summary 193
Chapter 7: Building SharePoint Web Parts 195
The SharePoint MCMS Navigation Control 197
Preparing the Development Environment 198
Creating the Web Part Project 199
Creating the Web Part 200
Defining Custom Properties for the Web Part 201
Developing Custom Properties for the Web Part 202
Building the Data Layer 207
Building the Presentation Layer 210
Web Part Deployment 214
Preparing the Web Part Description (.DWP) File 215
Preparing the Web Part Manifest File 216
Creating the Deployment Project 216
Executing the Deployment 218
Right-Click Deployment of Web Part CAB Files 219
Adding Our Web Part to a Page 220
Configuring the Web Part 222
Debugging the Web Part 223
Summary 224
Chapter 8: Useful Placeholder Controls 225
Before We Begin 226
A Date-Time Picker Placeholder Control 226
The DateTimePickerPlaceholderControl Class 227
Loading the Controls for Authoring 228
Retrieving Saved Content 230
Saving the Date and Time 230
Validating the Date and Time 231
Presenting the Selected Date and Time 231
The Date and Time Picker Dialog 232
Adding the Placeholder Control to a Template File 235
A Placeholder Control for Multiple Attachments 236
The MultipleAttachmentPlaceholderControl Class 238
Generating the Table of Attachments 239
Deleting Attachments 243
Reusing the Insert Attachment Dialog 244
Calling the Dialog 244
Returning Values from the Dialog 246
Saving the List of Attachments 251
Retrieving Saved Content 252
Preparing Arrays for Storing Information about the Attachments 252
Retrieving Previously Saved XML 253
Extracting Information about the Attachments from the XML 253
Populating the Table with the Saved Attachments 253
Displaying the Attachments 255
Using the MultipleAttachmentPlaceholderControl 256
An Image Rotator Placeholder Control 256
The ImageRotatorPlaceholderControl Class 256
Specifying the Resource Gallery 257
Loading the TextBox 258
Saving the Selected Resource Gallery Path 258
Loading Previously Saved Values 259
Rotating Images Randomly 259
Using the Image Rotator Placeholder Control 263
A Placeholder Control to Store All HTML Tags 263
The AllTagsHtmlPlaceholderControl Class 266
Saving All Kinds of Tags 266
Escaping Tags 267
UnEscaping Tags 267
Loading Content for Authoring and Presentation 267
Using the AllTagsHtmlPlaceholderControl 268
A DataGrid Placeholder Control 269
The DataGridPlaceholderControl Class 270
Loading the DataGrid for Authoring 271
Retrieving Placeholder Content 273
Saving the Modified XML 276
Adding a Row 277
Deleting a Row 278
Editing a Row 278
Updating a Row 278
Displaying the XML in Presentation Mode 279
Using the DataGrid Placeholder Control 281
Turning Off the Leave Warning Alert 282
Summary 284
Chapter 9: Validating Placeholder Controls 285
Limitations of the ASP.NET Validation Controls 285
The MCMSValidators Project 286
Validating the HtmlPlaceholderControl 287
Retrieving the Current Value of the HtmlPlaceholderControl 287
Checking for an Empty HtmlPlaceholderControl 289
Matching Tags with Regular Expressions 291
Building the Required HTML Placeholder Validator 292
Overriding the ControlPropertiesValid() Method 293
Overriding the OnPreRender() Method 293
Overriding the AddAttributesToRender() Method 295
Overriding the EvaluateIsValid() Method 297
Adding the Custom Validator to the Template File 297
Preventing Pages with Invalid Content from Being Saved 298
Save New Page with Validation 299
Save and Exit with Validation 299
Save with Validation 300
Adding the Modified Buttons to the Authoring Console 301
Implementing Server-Side Validation 302
The HtmlPlaceholderControl with Validation 303
The RequiredHTMLPHValidator with Server-Side Validation 305
Checking the Length of Text Entered 306
Canceling the Save Operation 308
Validating the SingleImagePlaceholderControl 309
Retrieving the Value of the SingleImagePlaceholderControl 309
Checking for an Empty SingleImagePlaceholderControl 310
The RequiredImagePHValidator 310
Validating the SingleAttachmentPlaceholderControl 312
Stored Values of the SingleAttachmentPlaceholderControl 313
Checking for an Empty SingleAttachmentPlaceholderControl 313
The RequiredAttachmentPHValidator 314
Summary 316
Chapter 10: Staging Static Pages 317
Site Stager in Brief 318
Installing Site Stager 319
Defining the Destination User 319
The Site Stager Administration Dialog 320
Creating a Staging Profile 321
Running a Job 323
Scheduling a Profile 324
Deleting a Profile 324
The ASP.NET Stager Application 325
The DotNetSiteStager Project 325
Configuring Stager Settings 326
Recording Messages to a Log File 329
Logging in as the 'Stage As' User 330
Revealing Hidden Postings 331
Staging Channels and Postings 331
Getting the Start Channel 331
Iterating Through the Channel Tree 332
Issuing an HTTP Request 333
Getting Responses and Creating Files 334
Staging Attachments 336
Collecting a List of Attachments to Download 336
Scanning Pages for Attachments 336
Storing Information about the Attachments to a List 339
Enhancing the Searches.GetByUrl() Method 341
Downloading the Attachments 343
Running the DotNetSiteStager 344
Suggested Improvements 345
Summary 345
Chapter 11: InfoPath with MCMS Web Services 347
Project Overview 347
What are ASP.NET Web Services? 349
Creating the MCMS Web Service Project 349
Creating the Business Layer 350
Maintaining Custom Properties 351
Creating the Lightweight Template Class 354
Maintaining Placeholder Values 355
Maintaining Placeholder Collections 359
Creating an Object to Maintain Postings 362
Creating the ASP.NET Web Service 369
The GetPosting() Web Method 370
Configuring IIS Security 371
Testing the Web Service 372
The SavePosting() Web Method 374
Preparing the InfoPath Environment 374
Creating the InfoPath Document 374
Creating the Controls in InfoPath 377
Cleaning up the Generated Form 379
Testing the InfoPath Form 383
Saving the InfoPath Form 384
Possible Enhancements to this Solution 384
Summary 384
Chapter 12: MCMS and RSS 385
Looking Ahead 385
The Structure of an RSS Feed 387
Providing Content as an RSS Feed 388
Creating the RSS Feed 388
Defining Global Settings in the Web.config 393
Testing the RSS Feed 393
Testing the RSS Feed in an Aggregator 394
Aggregating an RSS Feed into MCMS 395
Creating the Placeholder Control 395
Setting up the Authoring Interface 398
Retrieving and Parsing the RSS Feed 402
Rendering the RSS Feed in Presentation Mode 406
Adding the Control to a Template 408
Creating the Placeholder Definition in the Template 408
Adding the RSS Reader Placeholder to the Template 408
Testing the Template 409
Possible Enhancements 410
Enhancements to the RSS Feed Generator 411
Enhancements to the RSS Aggregator Placeholder Control 411
Summary 411
Chapter 13: Essential How-Tos, Tips, and Tricks 413
Tip #1: How to Revert a Posting to a Previous Version 414
The Revert Page to Previous Version Dialog 414
How to Get and Sort a List of Page Revisions 418
Programming the Button that Triggers the Page Reversion Process 419
Copying Content from One Placeholder to Another 422
Copying Custom Property Values 423
Adding the New Action to the Web Author Console 424
Tip #2: How to Change a Posting's Template 427
The Change Template Dialog 428
Creating a Copy of the Posting Based on the New Template 435
Adding the Change Template Button to the Web Author Console 438
Tip #3: How to Build a Recycle Bin 440
Creating a Recycle Bin Channel 441
Deleting the Posting 441
Restoring the Posting 446
The Recycle Bin Dialog 447
Listing All Deleted Items in the Recycle Bin 448
Restoring a Deleted Item 449
Permanently Deleting Items from the Bin 451
Adding the Recycle Bin Button to the Web Author Console 451
Tip #4: How to Deal with Links to Deleted Resources 454
What Happens When Resources Used by Postings Get Deleted 454
Detecting When Placeholder Content has Changed 455
Identifying Links to Deleted Resources 457
Removing Links from ImagePlaceholders and AttachmentPlaceholders 458
Removing Links from HtmlPlaceholders 459
Handling Images 459
Handling Attachments 460
Tip #5: How to Generate a Resource Dependency Report 463
The FindResources Project 463
Walking the Tree 465
Scanning Placeholder Content for Resources 465
Generating the Report 468
Tip #6: How to Update Posting Properties Directly from a Template File 469
Designing the Web User Control 469
Getting the Posting's Display Name 470
Hiding the Web User Control in Published Mode 471
Capturing the Posting's Save Event 471
Tip #7: How to Re-write Unfriendly URLs as Friendly URLs 472
An HttpModule to Intercept All Requests 473
Converting Unfriendly URLs to Friendly URLs 474
Handling Unfriendly URLs Caused by Postbacks 475
Activating the HttpModule 477
Tip #8: How to Export Resource Gallery Items using the Site
Deployment API 477
The SDAPIResourceExport Project 478
Setting Export Parameters 479
Collecting Resources 480
Creating the Service Posting 480
Starting the Export Process 484
Tip #9: How to Configure the Position and Size of the Web Author
Console Dialogs 486
Tip #10: How to Get Frames and IFrames to Work Correctly in a
Template File 487
When the Frame or IFrame Links to Another Site 488
When the MCMS Page is Embedded Within a Frame or IFrame of
Another Website 490
Summary 492
Appendix A: Setting up MCMS and SPS on the Same Virtual Server 493
SharePoint and MCMS-Managed URLs 493
Creating a New Virtual Server 494
Creating a New SharePoint Portal 495
Creating a New MCMS Web Entry Point 496
Configuring SharePoint to Allow MCMS Requests 496
Trust Settings for MCMS Web Applications 499
Verifying that SharePoint and MCMS are Functioning Correctly 499
Summary 500
Appendix B: MCMS Connector for SharePoint Technologies 501
Installation 501
Leveraging SharePoint Portal Search within an MCMS Site 502
Integrating MCMS Content into a Portal site 503
Publishing SharePoint Document Library Documents within an
MCMS Site 504
Additional Utilities Included 504
MCMS Connector Sample Data, Project, and Documentation 505
Summary 505
Appendix C: Installing the Tropical Green Website 507
Downloading the Sample Code 507
Creating the TropicalGreen Web Application 508
Adding the CMS Virtual Directory 508
Impoting the Site Deployment Object File 509
Creating the Guest Account 509
Checking the Server Configuration 510
Setting to Execute Locally 510
Configuring the Browser to Bypass the Proxy 511
Testing the Tropical Green Website 511
Index 513

Another Web Programming Books

No comments:

Post a Comment

Related Posts with Thumbnails
There was an error in this gadget

Put Your Ads Here!
There was an error in this gadget