sharepoint - download.e-bookshelf.de · professional sharepoint 2007 development 978-0-470-11756-9...

30
Updates, source code, and Wrox technical support at www.wrox.com Professional Microsoft ® Office SharePoint ® Designer 2007 Woodrow W. Windischman, Bryan Phillips, Asif Rehmani Wrox Programmer to Programmer TM

Upload: others

Post on 18-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ProfessionalMicrosoft® OfficeSharePoint® Designer 2007

www.wrox.com

$49.99 USA$54.99 CAN

Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.

Recommended Computer Book

Categories

Programming

Software Development

ISBN: 978-0-470-28761-3

Microsoft Office SharePoint Designer 2007 is a versatile application that provides all the necessary tools to modify nearly every aspect of a SharePoint web site’s look and feel. Yet, SharePoint Designer can do far more than just customize SharePoint sites and this book shows you how to maximize the potential of this fully featured web design tool.

Packed with step-by-step examples, sample code, and helpful screen shots, this resource begins with an overview of SharePoint Designer and SharePoint technology and then quickly moves on to teach you how to use SharePoint Designer to customize various aspects of your sites. The team of experienced authors demonstrates how SharePoint Designer is able to create powerful applications that would have normally required considerable programming effort, and they take you past the built-in features of SharePoint Designer with extensions, add-ins, migration, and conversion tools. With this book, you’ll be able to perfectly match a SharePoint site to an enterprise’s standards, connect SharePoint with other enterprise resources, or create something entirely new.

What you will learn from this book● Ways to create extensions to SharePoint and SharePoint Designer, with

examples in both C# and Visual Basic .NET● Techniques for customizing lists, libraries, and more● How to maximize your use of SharePoint Site Components● The anatomy of SharePoint master pages and themes● Methods for working with CSS editing tools in SharePoint Designer ● How to use Visual Studio and other tools to extend the capabilities of

SharePoint and SharePoint Designer● Things to consider when building SharePoint Designer workflows● Considerations for governing the use of SharePoint Designer in your

enterprise

Enhance Your KnowledgeAdvance Your Career

Who this book is forThis book is for web designers and developers who are looking to modify or enhance SharePoint products and technologies or anyone upgrading from Microsoft FrontPage to SharePoint Designer. A basic knowledge of JavaScript and HTML tags is assumed.

Microsoft

® Office

ShareP

oint® D

esigner 2007

Windischman, Phillips, Rehmani

Professional

subtitle

spine=1.104"

Updates, source code, and Wrox technical support at www.wrox.com

ProfessionalMicrosoft® Office

SharePoint®

Designer 2007Woodrow W. Windischman, Bryan Phillips, Asif Rehmani

Wrox Programmer to Programmer TMWrox Programmer to Programmer TM

Page 2: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ProfessionalMicrosoft® OfficeSharePoint® Designer 2007

Enhance Your KnowledgeAdvance Your Career

Professional Microsoft Office SharePoint Designer 2007978-0-470-28761-3Packed with step-by-step examples, sample code, and helpful screen shots, this resource begins with an overview of SharePoint Designer and SharePoint technology and then quickly moves on to teach you how to use SharePoint Designer to customize various aspects of your sites.

Real World SharePoint 2007: Indispensable Experiences from 16 MOSS and WSS MVPs 978-0-470-16835-6This anthology of the best thinking on critical SharePoint 2007 topics is written by SharePoint MVPs—some of the best and most recognized experts in the field. Some of the topics they cover include: Branding, Business Data Connector, Classified Networks, Forms-based authentication, Information Rights Management, and Zones and Alternate Access Mapping.

Professional SharePoint 2007 Development978-0-470-11756-9A thorough guide highlighting the technologies in SharePoint 2007 that are new for developers, with special emphasis on the key areas of SharePoint development: collaboration, portal and composite application frameworks, enterprise search, ECM, business process/workflow/electronic forms, and finally, business intelligence.

Professional SharePoint 2007 Web Content Management Development978-0-470-22475-5Use this book to learn such things as optimal methods for embarking on web content management projects, ways to implement sites with

multiple languages and devices, the importance of authentication and authorization, and how to customize the SharePoint authoring environment.

Beginning SharePoint 2007 Administration: Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007978-0-470-12529-8SharePoint MVP Göran Husman walks you through everything from planning and installation to configuration and administration so you can begin developing a production environment.

Beginning SharePoint 2007: Building Team Solutions with MOSS 2007978-0-470-12449-9This book provides detailed descriptions and illustrations of the functionality of SharePoint as well as real-world scenarios, offering coverage of the latest changes and improvements to Microsoft Office SharePoint Server 2007.

Get more out of WROX.com

Programmer to Programmer™

InteractTake an active role online by participating in our P2P forums

Wrox Online LibraryHundreds of our books are available online through Books24x7.com

Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble!

Chapters on DemandPurchase individual book chapters in pdf format

Join the CommunitySign up for our free monthly newsletter at newsletter.wrox.com

BrowseReady for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more!

Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing [email protected]

spine=1.104"

Page 3: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Professional Microsof t® SharePoint® Designer 2007

Introduction ..............................................................................................xxvii

Part I: The BasicsChapter 1: Exploring SharePoint Designer .......................................................3Chapter 2: SharePoint from the User’s Perspective ........................................33Chapter 3: SharePoint from the Administrator’s Perspective ...........................49Chapter 4: SharePoint from a SharePoint Designer’s Perspective ....................67

Part II: Customizing the SharePoint Look and FeelChapter 5: The Anatomy of a SharePoint Page ...............................................89Chapter 6: Using SharePoint Designer’s CSS Editing Tools ...........................123Chapter 7: The Anatomy of a Theme ............................................................147Chapter 8: Master Pages and Layouts .........................................................183

Part III: Applications without ProgrammingChapter 9: Building Your Own Workflows .....................................................215Chapter 10: Working with SharePoint Data ..................................................243Chapter 11: Advanced Data Access: External Data and More .......................271Chapter 12: Working with Forms .................................................................295

Part IV: Programming on the Client SideChapter 13: The Content Editor Web Part ....................................................321Chapter 14: The SharePoint Client-Side Object Model ..................................345

Part V: Beyond SharePoint DesignerChapter 15: Creating Workflow Elements in Visual Studio ............................375Chapter 16: Creating Custom Web Parts .....................................................407Chapter 17: Creating SharePoint Designer Add-ins .......................................435Chapter 18: A Little Administration .............................................................463Appendix A: A Brief History of SharePoint and SharePoint Designer ............. 489Index ........................................................................................................ 497

ffirs.indd iffirs.indd i 11/20/08 9:38:34 AM11/20/08 9:38:34 AM

Page 4: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ffirs.indd iiffirs.indd ii 11/20/08 9:38:35 AM11/20/08 9:38:35 AM

Page 5: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Professional

Microsof t® SharePoint® Designer 2007

ffirs.indd iiiffirs.indd iii 11/20/08 9:38:35 AM11/20/08 9:38:35 AM

Page 6: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ffirs.indd ivffirs.indd iv 11/20/08 9:38:35 AM11/20/08 9:38:35 AM

Page 7: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Professional

Microsof t® SharePoint® Designer 2007

Woody WindischmanBryan PhillipsAsif Rehmani

Wiley Publishing, Inc.

ffirs.indd vffirs.indd v 11/20/08 9:38:35 AM11/20/08 9:38:35 AM

Page 8: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Professional Microsof t® SharePoint® Designer 2007Published byWiley Publishing, Inc.10475 Crosspoint BoulevardIndianapolis, IN 46256www.wiley.com

Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-0-470-28761-3

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

Library of Congress Cataloging-in-Publication Data is available from the publisher.

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Microsoft and SharePoint are registered trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

ffirs.indd viffirs.indd vi 11/20/08 9:38:36 AM11/20/08 9:38:36 AM

Page 9: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

For my Mom and Dad, who have always encouraged me to follow my dreams …

— Woody

To my family, Susan, Gabriel, and Sarina, whose patience and support have allowed me

to contribute to this book. — Bryan

To my uncle Jowhar, who has always inspired and supported me to get me

where I am today. — Asif

ffirs.indd viiffirs.indd vii 11/20/08 9:38:36 AM11/20/08 9:38:36 AM

Page 10: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ffirs.indd viiiffirs.indd viii 11/20/08 9:38:36 AM11/20/08 9:38:36 AM

Page 11: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

About the Authors Woodrow (Woody) Windischman is a technology trainer and consultant with more than 20 years ’ experience in a variety of roles, allowing him to see problems holistically and come up with appropriate solutions. His SharePoint experience started even before SharePoint became a product, with predecessors such as Site Server, the Digital Dashboard Resource Kit, and the earliest versions of Microsoft FrontPage. Since then Woody ’ s been deeply involved in the SharePoint community — first having been awarded Microsoft SharePoint MVP from October 2005 through September 2007, and then working directly for the SharePoint product team. He ’ s active in several online SharePoint communities, including the TechNet forums.

Bryan Phillips is a software architect and senior partner with Composable Systems, LLC, specializing in service - oriented business solutions using the latest Microsoft technology. Bryan has worked professionally with Microsoft development technology since 1997 and holds the Microsoft Certified Trainer (MCT), Microsoft Certified Solution Developer (MCSD), Microsoft Certified Database Administrator (MCDBA), and Microsoft Certified Systems Engineer (MCSE) certifications. Bryan contributes regularly to the Microsoft development community by speaking on topics such as Smart Client, ASP.NET, SharePoint, SQL Server, and Mobile development; presenting DevCares courses; and blogging on topics of interest to developers. Bryan is a Microsoft Most Valuable Professional (MVP) in Client Application Development.

Asif Rehmani has been a Trainer and a Consultant working out of the Chicago office of SharePoint Solutions ( http://sharepointsolutions.com/chicago ) since early 2005. He is a SharePoint Server MVP and MCT.

Asif runs a SharePoint eLearning website ( http://sharepoint - elearning.com ), which provides numerous SharePoint Video Tutorials on various topics within SharePoint.

He has been a speaker on SharePoint topics at several conferences over the years, including Microsoft SharePoint Conference, SharePoint Connections, Advisor Live, and the Information Workers Conference. Also, he is one of the founders and active current leaders of the Chicago SharePoint User Group ( http://cspug.org ). For a more detailed bio, please visit http://sharepoint - elearning.com/Pages/Bio.aspx .

About the Technical Editors Jacob J. Sanford began his career in, of all things, accounting and auditing. He graduated from Florida State University in 1997 with B.S. degrees in accounting and finance, which made him eligible to sit for the CPA exam. Although he realized in college that he was more interested in computers and technology, he decided to give accounting a chance. It didn ’ t last. He had been dabbling in HTML and VBA when he took a job at a private software company and met David Drinkwine, who introduced him to the wonders of classic ASP. From there, he began learning as much as he could about all kinds of web application development, including ColdFusion, PhP, PhotoShop, CSS, XML, and finally ASP.NET (starting in the 1.0 and 1.1 release). He has been using ASP.NET (VB and C# — but mostly C#) for the last four or five years. He has worked at several State of Florida agencies and, in that capacity, found a fondness for pure CSS design and accessibility considerations. Most recently, he has started focusing on new technologies and tools such as Microsoft Silverlight and Visual Studio 2008.

ffirs.indd ixffirs.indd ix 11/20/08 9:38:36 AM11/20/08 9:38:36 AM

Page 12: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Jacob is currently a Senior Consultant with Captar é Consulting, LLC, and is the founding leader of the Tallahassee SharePoint Experts Exchange for Developers (SPEED). He is a regular presenter at regional .NET Code Camps and at local .NET User Group meetings and is the author of Professional ASP.NET 2.0 Design (Wrox) and one of the authors of Professional SharePoint 2007 Design (Wrox).

Jacob lives in Tallahassee, Florida, with his beautiful wife, Shannan. He has two amazing sons, Matthew and Hayden, and an eternal puppy, Petey.

Coskun Cavusoglu is the Director of Consulting Services and the Chief Solution Architect of Captar é Consulting, LLC ( www.captare.com ). He has been architecting and implementing technology solutions for more than 10 years in both large, enterprise organizations and fast - growth midmarket firms. Coskun consults on a variety of business process practices. He has a broad range of expertise in areas such as knowledge management, business process analysis, collaboration, project management, office productivity, and application programming. As a software engineer specializing in the .NET Framework and the Office Server System, specifically Windows SharePoint Services and Microsoft Office SharePoint Server, he has extensive experience designing, implementing, and supporting Internet solutions using Microsoft technologies such as SharePoint, CRM, Project Server, Windows Server, Active Directory, Exchange, IIS, and ASP .NET 2.0/3.5.

Coskun is a technology writer, a blogger, and a published author on Microsoft server products. His latest book, which he coauthored with fellow SharePoint experts, is called Professional Microsoft SharePoint 2007 Design (Wrox), and his blog is located at http://sharepointblogs.com/gnarus . He also is a speaker who attends various community events, both local and international, where he talks about various SharePoint topics, and his past and future engagements can be found at his blog.

Coskun is a Microsoft Certified Professional and is also a Microsoft Certified Technology Specialist for SharePoint Portal Server 2003 and Microsoft Office SharePoint Server 2007.

Arif Ilhan Kolko earned a B.S. degree in Industrial Engineering from Purdue University, and then moved to Chicago, Illinois, to start his professional career at Chicago Metallic Corporation, an international manufacturing company, as a quality/manufacturing engineer. The companies he has worked for as an engineer and manager include the Coca - Cola Company, Pirelli Tire Company, and Networked Concepts.

Looking to merge his development skills and experience with his career interest in conducting client - based, time - sensitive projects, Ilhan joined Captar é Consulting, LLC, in October 2007. He currently serves as a Senior Consultant and the Vendor Management Office (VMO) Representative. In his professional career, Ilhan has successfully managed and delivered several process optimization, quality systems development, lean manufacturing, capital investment justification, process simulation, business development, product - system innovation, and web application design and development projects. Ilhan has been a certified Six Sigma Green Belt since 2004 and a Microsoft Certified Professional Developer (MCPD) since Spring 2008.

Ilhan received his first master ’ s degree, summa cum laude, from DePaul University, in Marketing Analysis. He is planning to start working toward his MBA degree in Operations Management by January 2009 at a school to be decided.

About the Authors /Technical Editors

x

ffirs.indd xffirs.indd x 11/20/08 9:38:36 AM11/20/08 9:38:36 AM

Page 13: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Acquisitions Editor Katie Mohr

Development Editor Maryann Steinhart

Technical Editors Jacob Sanford Coskun Cavusoglu Arif Ilhan Kolko

Production Editor Kathleen Wisor

Copy Editor Foxxe Editorial Services

Editorial Manager Mary Beth Wakefield

Production Manager Tim Tate

Vice President and Executive Group Publisher Richard Swadley

Vice President and Executive Publisher Joseph B. Wikert

Project Coordinator, Cover Lynsey Stanford

Proofreader Nancy Carrasco

Indexer Jack Lewis

Credits

ffirs.indd xiffirs.indd xi 11/20/08 9:38:36 AM11/20/08 9:38:36 AM

Page 14: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ffirs.indd xiiffirs.indd xii 11/20/08 9:38:37 AM11/20/08 9:38:37 AM

Page 15: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Acknowledgments

Every writer needs a first book, and this is mine. While I never thought it would be easy, I have learned that a lot more goes into the planning, writing, and publishing of a work like this than you might guess. It was definitely not a solo effort, and I would like to express my deepest appreciation to the many people who helped make it possible. In particular, I would like to thank: Jerome Thiebaud, Product Manager for Microsoft Office SharePoint Designer, for encouraging me to pursue this; Katie Mohr and Maryann Steinhart of Wiley, for giving me the opportunity, helping to guide me through the process, and putting up with innumerable delays; and especially Bryan Philips (chapters 15 – 17 ) and Asif Rehmani (chapters 6 – 8 ) for joining me as coauthors to overcome some of those delays.

— Woody

I would like to thank Woody Windischman for giving me the opportunity to contribute to this book. I have always wanted to share my knowledge and experience with others, and this book is an excellent vehicle to do so.

I would also like to thank Todd Bleeker for his information on converting SharePoint Designer workflows for use in Visual Studio. His time and effort in developing those techniques have reduced my time on this book.

Finally, I would like to thank Jacob Sanford and Coskun Cavusoglu for their meticulous technical editing and review of my work. As this is my first published work, their patience and guidance are greatly appreciated.

— Bryan

First and foremost, I thank God for all the opportunities that have been sent my way throughout my life to get me to this point. In terms of mortals, I would like to first thank my beautiful wife, Anisa, for her support and understanding throughout the writing process. I know it wasn ’ t easy putting up with my schedule at times, but I appreciate that you did. Also, thanks to my wonderful boys, Armaan and Ayaan, who always put a smile on my face when I need it the most. Thanks to my parents for the hardworking genes that they have passed on to me, which always keep me going.

On a professional note, I would like to thank Katie Mohr with Wiley Publishing for giving me the chance to contribute to this book project. Also, thanks to AC for referring me to Katie. I owe you one! A special thanks to my mentors and friends at SharePoint Solutions, Jeff Cate and Kevin Pine. The support and encouragement you have provided me through the years, to help me sharpen my instructional skills and business acumen, have not gone unnoticed. Thank you.

— Asif

ffirs.indd xiiiffirs.indd xiii 11/20/08 9:38:37 AM11/20/08 9:38:37 AM

Page 16: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

ffirs.indd xivffirs.indd xiv 11/20/08 9:38:37 AM11/20/08 9:38:37 AM

Page 17: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

Introduction xxvii

Part I: The Basics 1

Chapter 1: Exploring SharePoint Designer 3

SharePoint Designer as a Web Editor 3Page Editor 6

Design View 7Visual Aids 7Table-Editing Tools 9Page Sizes and Browser Preview 11

Code View 14IntelliSense and More 15Visual Coding 18Script Editor 19

Split View 20Toolbars and Task Panes 21

Managing Toolbars and Task Panes 22Toolbars 24General-Purpose Task Panes 24SharePoint-Specific Task Panes 26

Web Site (Structural) Views 26Files and Folders 26Remote Web Site 27Reporting Tools 28Navigation and Hyperlinks 29

Summary 32

Chapter 2: SharePoint from the User’s Perspective 33

A Default SharePoint Home Page 33SharePoint Content: Lists, Libraries, and More 35

List and Library Types 36Customizing Lists and Libraries 39

ftoc.indd xvftoc.indd xv 11/20/08 9:40:09 AM11/20/08 9:40:09 AM

Page 18: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xvi

Columns (Fields) 39Content Types 40Understanding Views 41

Web Parts 42In the Zone 43Some Standard Web Parts 46Making the Connection 47

Summary 48

Chapter 3: SharePoint from the Administrator’s Perspective 49

On the Site 49Users and Permissions 51

Being a User 52Group Think 54

Look and Feel — Navigational Elements and More 56Galleries 58

On the Server 59Central Administration 60The File Structure 62The STSADM Command 62The SharePoint Databases 63

The Configuration Database 63The Content Databases 63

Summary 65

Chapter 4: SharePoint from a SharePoint Designer’s Perspective 67

Navigating a SharePoint Site 67Opening a SharePoint Site 67Identifying Components 69Libraries, Lists, and Content Types 70

Libraries 71Lists 72Content Types 73

Galleries 73Workflows 75

List and Library Properties 75The Settings Tab 76The Security Tab 77The Supporting Files Tab 78

ftoc.indd xviftoc.indd xvi 11/20/08 9:40:09 AM11/20/08 9:40:09 AM

Page 19: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xvii

Contributor Settings 78Contributor Settings versus Permission Levels 80Configuring Contributor Settings 81

Contributor Groups 81Region Types 85

Summary 86

Part II: Customizing the SharePoint Look and Feel 87

Chapter 5: The Anatomy of a SharePoint Page 89

Bits and Pieces 89Here, There, and Everywhere 90Ramifications and Reversion 91

Lost Ties 91Performance 92Back to the Future 92

The Special Case of the _layouts Folder 93Web Part Pages 94

Master of Their Own Destiny 94Inside a Content Page 96List and Library View Pages 98

SharePoint Master Pages — A Deep Dive 99The Default Style Sheets 99The Bare Necessities 100

Content Regions 101The Very Least You Can Do 105SharePoint: Functional Stuff 107

A Not-So-Minimal Master, from Head to Toe 108Sight Unseen 109The Global Navigation Bar 110Site (Global) Title Area 112Top (Tab) Navigation Area 113Page Edit Bar 115Page Title Area 116Left Navigation Bar 117Main Body Area 121More No-See-Ums 122

Summary 122

ftoc.indd xviiftoc.indd xvii 11/20/08 9:40:09 AM11/20/08 9:40:09 AM

Page 20: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xviii

Chapter 6: Using SharePoint Designer’s CSS Editing Tools 123

What Are Cascading Style Sheets? 123Styling versus Formatting Objects 123CSS Code Placement 124Riding the Cascade: Inheritance and Overrides 125A Touch of Class 126

CSS in SharePoint 126Preexisting CSS Files in SharePoint Server 127Style Sheets Can Be Stored in Multiple Locations 128

Styles in the Content Database 128Styles on the Web Server 129Saving Styles to an External Location 129

Working with Style in SharePoint Designer 129Page-Editing Options 130SharePoint Designer’s Task Panes and Toolbars 132

Identify Your Style 133Create Your Own Style 137Checking Your Work 144

Summary 146

Chapter 7: The Anatomy of a Theme 147

What Are SharePoint Themes? 147SharePoint’s Themes 149

Where Themes Live — The 12 Hive 150A Look Inside a Theme Folder 152How to Declare Themes 153

Use SharePoint Designer to Explore and Customize Themes 154Exploring a Theme Once It’s Applied to a Site 154Run CSS Report to Pinpoint Usage of the Styles 156Customize the Theme 158

Change the Global Breadcrumb Background Color 158Change Font Color of Global Links 160

Publishing the Modified Theme 163A Customized Theme, from Head to Toe 166

Page Banner and Background 166Global Breadcrumb and My Site Link 167Global Links — Welcome and My Links 167Site Logo 168Site Title 168

ftoc.indd xviiiftoc.indd xviii 11/20/08 9:40:10 AM11/20/08 9:40:10 AM

Page 21: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xix

Search Controls 169Global Navigation 169Site Actions Menu 170Page Navigation Breadcrumb 171Quick Launch Navigation Area 171Tree View Pane 173Web Parts 174List or Library Description Text 175Calendar List 175Bottom Area of the Master Page 177Title Area of a Web Part Page 178New Items Toolbar 178Form Field Background 179Toolbar for Lists and Libraries 180

Summary 180

Chapter 8: Master Pages and Layouts 183

Web Content Management in SharePoint 183When SPS Met CMS 184Publishing Sites: The Key to WCM 184

Master Pages Revisited 185What You Get with the Default Installation of MOSS 186Creating a Master Page for a Publishing Site Using SharePoint Designer 188

Create the .master File 189 Building the Master Page ’ s Preview Image 191Publishing the Master Page 192Apply the Master Page to the Site 193

Lay Out Your Page Layout 195Page Layouts That Come with SharePoint Server 195Content Types — At the Heart of It All 196Creating a Content Type for a Page Layout 197Create Page Layouts Using SharePoint Designer 199

Field Controls 202Web Part Zones 205Building the Page Layout’s Preview Image 206Save the Layout Page 206

Create Publishing Pages Based on Page Layouts 207Decoupling a Page from a Page Layout 210Summary 211

ftoc.indd xixftoc.indd xix 11/20/08 9:40:10 AM11/20/08 9:40:10 AM

Page 22: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xx

Part III: Applications without Programming 213

Chapter 9: Building Your Own Workflows 215

Introducing the Workflow Designer 215Creating a New Workflow 216Example Workflow 217Editing an Existing Workflow 222

Workflow Elements in Detail 224Start Options 224Initiation Parameters 226Initiation Form 227Variables 228Steps 229Conditions 229Actions 231

Core Actions 232List Actions 234Task Actions 235

Changing a Workflow 237SharePoint Designer Workflow Considerations 239

Limitations 239Ramifications and Cautions 240

Summary 241

Chapter 10: Working with SharePoint Data 243

List View Revisited 244List View Control Menu 246

Fields 247Change Layout 247Sort and Group 249

Sorting 249Grouping 249

Filter 251Introducing the XSLT Data View 251

Converting a List View 252Changes for the User 252Changes in SharePoint Designer 253Reverting 253

The Data Source Library 254Creating a Data View from the Data Source Library 254

ftoc.indd xxftoc.indd xx 11/20/08 9:40:11 AM11/20/08 9:40:11 AM

Page 23: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xxi

Making Connections 257What Is a Web Part Connection? 257Creating a Web Part Connection 257

The Send Options 258The Get Options 259Selecting a Target 259Mapping Source and Target Entities 259Defining the Trigger 260

Data View Editing Basics 261Table for One (One Row, That Is . . . ) 261Conditional Formatting 261

Conditional Formatting Actions 262Setting the Condition(s) 263

Modifying the Data View Properties 263XSLT in Brief 264

Location, Location, Location… 265The XPath Expression Builder 266

Summary 269

Chapter 11: Advanced Data Access: External Data and More 271

The Data Source Library in Detail 271The Data Source Types 272Adding and Modifying Data Sources 273

SharePoint Lists and Libraries 274Database Connections 275XML Files 276Server-Side Scripts 277XML Web Services 278Business Data Catalog 280

Connecting to Other Libraries 281Sites in the Same Site Collection 281Sites in a Different Site Collection 282

Linking Data Sources 282Working with Hierarchical Data 284

Create the Data Source 284Insert the Web Part 286Insert and Customize the Subview 289Get Connected 291Exploring Further 292

More about the Business Data Catalog 293Data Views on the Move 293Summary 294

ftoc.indd xxiftoc.indd xxi 11/20/08 9:40:11 AM11/20/08 9:40:11 AM

Page 24: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xxii

Chapter 12: Working with Forms 295

SharePoint Designer’s Form Tools 295Traditional Web Forms 297

HTML Forms and Legacy FrontPage Webbots 297Creating an HTML Form 297Assigning a Back-End Processing Action 299Classic FrontPage Processing — The SaveResults Webbot 301

ASP.NET Data Forms 302Working Locally 302Enabling the ASP.NET Development Server 302Configuring a Database Connection 304Connecting Controls to a Data Source 306

SharePoint Data Forms 308Multimode Data Views 308Custom List and Library Forms 311

Creating a New List or Library Form 312New Item Form 313Display and Edit Forms 313Using Your Form(s) 315Return to Sender 316

Summary 318

Part IV: Programming on the Client Side 319

Chapter 13: The Content Editor Web Part 321

What Is the Content Editor Web Part? 321Rich Text Editor 323Source Editor 324External Content 325Rendering 325A Simple Example 325

Preparation 326The Change 327

The Content Editor in SharePoint Designer 328Design View: The Page within a Page 328Code View: XML Strikes Back 330

Customized Search Results: A Complete Page Example 331Create the Page 332Add the Web Parts 333Prepare the Content Editor 335

ftoc.indd xxiiftoc.indd xxii 11/20/08 9:40:11 AM11/20/08 9:40:11 AM

Page 25: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xxiii

Modify the Core Results 336Attach the Results to the Query Web Part 338

Tokens of Affection 339The _WPQ_ Token 339The _LogonUser_ Token 340The _WPID_ Token 341The _WPR_ Token 341

A Few Tips and Tricks 341Keep It Simple 341Use the Script Editor 341Create a Shell Page 341Keep CEWPs Portable 342

Summary 343

Chapter 14: The SharePoint Client-Side Object Model 345

What Is the Web Part Page Services Component? 345Page Initialization 346Page Services 346WPSC Child Objects 346

WebPartPage Object 347WPSC Collections 347Parts Collection and Part Object 348Properties Collection and Property Object 351

The Web Part Page Event Model 354Registering for an Event 355System Events 356Raising Your Own Events 358

Changing the Preview Web Part 358Changing the Results XSL 359

Special Event Functions 359Connection Events 359Prompted Save 359

Web Part Storage 360The Properties Collection 360

Into the Ether: Saving Changes, Or Not 361A Simple Property Update Example 361

PartStorage: Your Very Own Property 363One for All? 363

Beyond the WPSC 364Accessing Page Components via the DOM 364Other Client-Side Objects 364

ftoc.indd xxiiiftoc.indd xxiii 11/20/08 9:40:12 AM11/20/08 9:40:12 AM

Page 26: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xxiv

Using Client-Side Objects — A Web Part Walk-Through 365Create an HTML Page and Insert the Visible Elements 366Initialize 366Save the Friends List 367Build the Friend Display Table 368Display the Editing Panel 370Update a Contact’s Status 370Using the Page 371

Summary 372

Part V: Beyond SharePoint Designer 373

Chapter 15: Creating Workflow Elements in Visual Studio 375

What You Need to Get Started 375Introduction to Custom Actions 376

Creating a Custom Action 376Creating Properties for Your Custom Action 382Adding Functionality to Your Action 387

Custom Actions and ACTIONS Files 390Action Element 391RuleDesigner Element 391FieldBind Element 392Parameter Element 392

Creating a Custom ACTIONS File 392Deploying and Configuring Your Custom Action 396

Adding the Assembly to the Global Assembly Cache 396Deploying the ACTIONS file 396Updating the web.config File 397

Testing Your Custom Action 398Creating a Custom List 398Creating a Workflow in SharePoint Designer 400Adding an Item to the Custom List 403Troubleshooting Problems 404

Summary 405

Chapter 16: Creating Custom Web Parts 407

What You Need to Get Started 407About Custom Web Parts 408

Creating a Web Part 409Creating a User Interface for Your Custom Web Part 414

ftoc.indd xxivftoc.indd xxiv 11/20/08 9:40:12 AM11/20/08 9:40:12 AM

Page 27: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xxv

Deploying and Configuring Your Web Part 425Adding the Assembly to the Global Assembly Cache 426Update the web.config File 426Add Your Web Part to the Web Part Gallery 428

Testing Your Web Part 430Troubleshooting Problems 433

Summary 434

Chapter 17: Creating SharePoint Designer Add-ins 435

What You Need to Get Started 435Introducing Visual Studio Tools for Office Add-ins 435Installing the SharePoint Designer Add-In Project Templates 436Creating Your Add-In 438Testing Your Add-In 456Summary 462

Chapter 18: A Little Administration 463

Reporting 463Configuring SharePoint for Usage Reporting 464SharePoint Designer Reports 466

Site Content Reports 467Site Usage Reports 468Customizing and Exporting Reports 470

SharePoint Web-Based Reports 470Basic Reports 471Advanced/Publishing Reports 472Search Reports 473

Building Your Own Reports 474Backup Plans 474

Backing Up through SharePoint Designer 474SharePoint Designer Backup 474SharePoint Designer Restore 475SharePoint Designer Publishing 476

Other Backup Techniques 476STSADM.EXE 476Backups through the Web Interface 477Third-Party Tools 477

Templates and Packages 477List and Library Templates 477

Saving a List Template 478

ftoc.indd xxvftoc.indd xxv 11/20/08 9:40:12 AM11/20/08 9:40:12 AM

Page 28: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Contents

xxvi

Saving a Site Template 479Moving a Template to Another Templates Gallery 479Sharing a Site Template at the Farm Level 481

Site Definitions 482The Great Debate 482Converting a Customized SharePoint Site to a Site Definition 484

Summary 488

Appendix A: A Brief History of SharePoint and SharePoint Designer 489Index 497

ftoc.indd xxviftoc.indd xxvi 11/20/08 9:40:13 AM11/20/08 9:40:13 AM

Page 29: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Introduction

“ Can you make it look less like SharePoint? ”

Such a simple question, and yet, like someone opening the lid to Pandora ’ s Box, the customer asking it can release a whole range of troubles into the life of a web designer. The latest release of Microsoft SharePoint products has taken the world by storm. Faster than anyone could have foreseen, businesses large and small have discovered that SharePoint addresses a range of needs, and have rushed to jump on the bandwagon.

SharePoint is not merely a web server. It is a large and complex application, with many moving parts. Some of them are easy to customize; others require a bit more finesse. Tools and guidance for that customization are few and far between. Fortunately for you, SharePoint Designer is such a tool, and this book provides the guidance. Together, they enable you to look your customer in the eye and answer with a resounding: “ Yes! ”

Yet SharePoint Designer can do far more than customize SharePoint sites. It is a fully - featured web design tool in its own right, with excellent support for many industry standards, as well as backward compatibility with a few nonstandard capabilities.

Who This Book Is For This book is for anyone who has been asked the opening question. You may be an experienced web designer or a web application developer who has never used SharePoint. You may be a system administrator who needs to tweak a few things to match an existing standard. Perhaps you are a business analyst looking for ways to integrate some CRM information into the company ’ s home page. All of you will find something useful here.

If your familiarity with SharePoint is limited, chapters 2, 3, and 4 will be indispensable for you. They cover the key features of SharePoint, and how they are viewed from the user ’ s, administrator ’ s, and web designer ’ s perspectives, respectively.

This book is also for people upgrading from Microsoft FrontPage. SharePoint Designer is one of two direct successors to FrontPage. As a result, FrontPage users will find much that is familiar, as well as many things that have changed. In general, you will find that while you can edit existing sites that use legacy features, SharePoint Designer ’ s function layout encourages a much more standards - compliant way to design new sites and content.

This book assumes you have a more than passing familiarity with designing applications for the web. A basic knowledge of JavaScript is assumed, as is an understanding of HTML tags. Some allowance is made for the rise of certain technologies in recent years. A few chapters deal with CSS, XML, and XSL, and a short introduction to each is provided where appropriate.

flast.indd xxviiflast.indd xxvii 11/20/08 9:39:05 AM11/20/08 9:39:05 AM

Page 30: SharePoint - download.e-bookshelf.de · Professional SharePoint 2007 Development 978-0-470-11756-9 A thorough guide highlighting the technologies in SharePoint 2007 that are new for

Introduction

xxviii

The book also assumes a certain willingness to explore. Although all of the core functions, menus, and toolbars of SharePoint Designer are described, this is not a Bible that explains each and every menu item and dialog tick in excruciating detail. If a program feature offers several options, a representative few are described, and one may be used in an example.

The book assumes you are familiar with basic Windows operations and applications. Where functions are common in many applications, they probably are not discussed at all. (You are shown where to find the Formatting toolbar, for instance, but your familiarity with the icons and meanings of Bold, Center, and the various bulleting options is assumed.) It ’ s also assumed that you know how to point, click, cut, copy, and paste.

The later chapters move out of SharePoint Designer and into Visual Studio. They cover creating extensions to SharePoint, SharePoint Designer, or both. Examples are provided in both C# and Visual Basic .NET. Although the source is discussed and/or documented in the text, no attempt is made to teach the languages themselves, so proficiency in one of these languages is desirable. Many readers may consider these chapters optional, although system administrators should at least pay attention to chapter 18.

What This Book Covers This book covers Microsoft Office SharePoint Designer 2007, with an emphasis on using it to customize web sites based on Microsoft SharePoint products and technologies. You will learn about Master Pages, Themes, and various Web Parts that enable you to create powerful applications with little or no code.

A short overview of SharePoint is provided to ensure that you are not flying blind when you customize SharePoint sites. At the other end of the scale, you are taken outside the box with chapters that teach you how to use Visual Studio and other tools to extend the capabilities available in both SharePoint and SharePoint Designer.

Aspects of SharePoint Designer beyond SharePoint customization are not ignored, however. You will find sections that cover the basic web - editing features, generic application of the CSS editor, and site administration functions provided by SharePoint Designer. Many elements, such as Data Views, while described in the SharePoint context, are also relevant without a SharePoint environment.

How This Book Is Structured This book is made up of 18 chapters, in five parts. Each part brings together related tasks and content. Part I is fundamental to everything else, but the other parts do not necessarily need to be read in a particular order. They are, however, largely progressive in their complexity.

Part I, “ The Basics, ” provides an overview of SharePoint Designer, SharePoint technology, and their relationship to one another.

Part II, “ Customizing the SharePoint Look and Feel, ” shows how to use SharePoint Designer to customize various aspects of your sites.

flast.indd xxviiiflast.indd xxviii 11/20/08 9:39:05 AM11/20/08 9:39:05 AM