You are on page 1of 439

Redbooks: Building a sample website with IBM Web Content Manager 7.

Cali Clarke Stuart Crump Dineshbabu Ramakrishnan Raul Munoz Serrano Hebba Soliman Rayomand Sui Narla Vasudevamurthy Wei-Dong (Jackie) Zhu

Preface
Important Note about referencing the latest information

This PDF document represents the overall Building a sample website with IBM Web Content Manager 7.0. In addition to the information contained in this document, also refer to the complete Lotus Redbooks Wiki at the following URL:

http://www10.lotus.com/ldd/portalwiki.nsf/xpViewCategories.xsp?lookupName=Redbooks%3A%2 0Building%20a%20Sample%20Website%20Using%20IBM%20Web%20Content%20M anager%207.0


IBM Lotus and IBM Redbooks have partnered together to show you how the fictitious company River Bend Tea and Company Inc (River Bend) uses IBM Web Content Manager to build their website. See how they developed the architecture, deployed the system, designed the site, and went live with dynamic content. Web Content Manager provides a sophisticated web content management tool and platform that is designed to accelerate the delivery and management of critical business information. It enables a collaborative approach to content creation for individuals and teams. It allows for approval of processes, management, and assets. Web Content Manager is an extremely powerful and sophisticated tool that is remarkably easy to use. This wiki addresses specific technical aspects of Web Content Manager, by discussing its underlying architecture, features, and capability. This wiki focuses specifically on Web Content Manager Version 7, but much of what is discussed here applies to earlier versions of the product as well. The wiki is divided into five parts: Part 1 Introduction Part 2 Architecture and design Part 3 Building a website - River Bend Tea and Coffee Company Part 4 Expanding Web Content Manager environment Part 5 Site administration and operations To support users in the initial stages of learning about the product, this wiki explains how to build a sample site from the initial concepts to asset creation and final delivery. To illustrate the steps in building the site, the wiki builds the sample site for the fictitious company, River Bend Tea and Coffee Company. The wiki then expands upon this experience and explores additional and more sophisticated areas of the product, including where there are opportunities for customization. In addition to discussing specific technical features, the wiki discusses the key concepts and best practices for creating an accurate information architecture and site framework. DISCLAIMER: This wiki outlines an example of building a basic website using a sample site, River Bend. This sample is not intended as a best practice for development, configuration, architecture, or any other aspect, such as scalability or performance. No warranty or support is implied for the example site or sample code used.

2 of 439

The team who wrote this wiki


This wiki was produced by a team of technical specialists from around the world working together in remote fashion. Cali Clarke is a Senior IT Specialist in the UK working with Lotus Collaborative technology in IBM Software Group. Cali joined Lotus over 20 years ago working mostly with Notes & Domino technologies before her current role in Technical Sales. She has worked with WCM since IBM acquired Aptrix in 2003. In her current role she works with large and small customers to develop and facilitate their use of IBM Exceptional Web Experience technologies. In her spare time she enjoys live music, cooking as well as running her nail polish blog. Stuart Crump is a senior accredited IT specialist working in the Lotus brand of IBM's Software group. Living in West Sussex, he travels around the UK , working primarily with finance organisations helping them adopt and gain business benefit from the entire Lotus brand portfolio. Stuart has worked with Lotus Domino, WebSphere and general web technologies for over 10 years. When not working, Stuart enjoys riding and restoring old British motorbikes and plans to take a trip across France and Spain on his motorbike. Dineshbabu Ramakrishnan is a Staff Software Engineer in IBM Software Group in Research Triangle Park, NC working with the IBM Web Content Manager support team. He has over 11 years of experience in both development and support of IBM WebSphere Application Server, WebSphere Portal Server, Web Content Manager, and has been working on WebSphere Portal and Web Content Manager since 2003. He is also an IBM Certified Application Developer and IBM Certified System Administrator for Workplace Web Content Management, WebSphere Portal, and Web Content Manager. Raul Munoz Serrano is a Collaboration Solutions Architect in IBM Software Group. He lives in Madrid, Spain. He has been working with Portal / WCM technologies for ten years since the early Portal 4.0 days. He likes playing with his children and running long distances from time to time.

3 of 439

Hebba Soliman is a Senior Application Developer in IBM Egypt, Global Delivery Center (EGDC). She has been working as a developer and designer in many IBM Web Content Manager and WebSphere Portal projects in the last couple of years.

Rayomand Sui is a Client Technical Professional (CTP) for the IBM Collaboration Solutions (ICS) software brand in Wellington, New Zealand. In his previous role at IBM, he was part of the IBM Software Services for Lotus (ISSL) team delivering successful WebSphere Portal and IBM Web Content Manager solutions. He has worked with IBM Lotus technologies for over thirteen years and has been involved with IBM Web Content Manager implementations since 2003. He has also co-authored the IBM developerworks white paper "IBM Workplace Web Content Management V2.x to V6.x Migration Guide" and the IBM Redbooks wiki "Building a Website Using Lotus Web Content Management 6.1". In his spare time, he enjoys playing tennis, trying his culinary skills in the kitchen and Ceroc dancing. Narla Vasudevamurthy is a Software Engineer at WebSphere Web Content Management L2 Support, IBM Software Group. He has over 18 years of experience in the IT Industry. He has been working with Websphere Portal software since 2003. He is also a IBM Certified System Administrator - WebSphere Portal and WebSphere Application Server. Wei-Dong (Jackie) Zhu is an Industry Solution Project Leader with International Technical Support Organization. She has more than 10 years of software development experience in accounting, image workflow processing, and digital media distribution using C, C++, Java, and Lotus Notes scripts. Jackie holds a Master of Science degree in Computer Science from the University of the Southern California. Jackie joined IBM in 1996. She is a Certified Solution Designer for IBM Content Manager and has managed and lead the production of many Enterprise Content Management redbooks and Lotus Domino redbooks wiki projects.

Supporting contributors and reviewers


Thanks to the following people for their contributions to this project: David De Vos - WCM Field Architecture Mark Hampton - Senior Software Engineer Rob Enright - ICSS Solution Architect

4 of 439

Thanks to the authors of the previous editions of this wiki. Authors of the second edition, Building a Web Site using IBM Web Content Management, published in 2008, were: John Bergland Joesephine E Justin (Joyce) Hebba Soliman Stuart Crump Raul Munoz Serrano Erasmus Tapera Narla Vasudevamurthy Rayomand Sui

Become a contributor
Join us for a two- to six-week residency program! Share your knowledge with peers in the industry and learn from others. Help create content about specific products or solutions, while getting hands-on experience with leading-edge technologies. You will have the opportunity to team with IBM technical professionals, Business Partners, and Clients. Your efforts will help increase product acceptance and customer satisfaction. As a bonus, you will develop a network of contacts in IBM development labs, and increase your productivity and marketability. Find out more about the residency program, browse the residency index, and apply online at: http://www.ibm.com/redbooks/residencies.html

Comments are welcome


Your comments are important to us! We want the content in this wiki and all our wikis to be as helpful as possible. Provide us your comments in one fo the following ways: Use the commenting feature with in the wiki. Login and add comments, located at the bottom of each page. Provide feedback in the Web form located at: http://www-12.lotus.com/ldd/doc/cct/nextgen.nsf/feedback?OpenForm

Stay connected to IBM Redbooks


Find us on Facebook: http://www.facebook.com/IBMRedbooks Follow us on Twitter: http://twitter.com/ibmredbooks Look for us on LinkedIn: http://www.linkedin.com/groups?home=&gid=2130806 Explore new Redbooks publications, residencies, and workshops with the IBM Redbooks weekly newsletter: https://www.redbooks.ibm.com/Redbooks.nsf/subscribe?OpenForm Stay current on recent Redbooks publications with RSS Feeds: http://www.redbooks.ibm.com/rss.html

5 of 439

Part 1. Introduction
Part 1 covers the following topics: 1.1 Introduction to this guide This section introduces the Redbooks wiki: Building a website using IBM Web Content Manager. 1.2 Website fundamental This section describes the basic terminology and concepts of a website. It also examines why build a web site, the objectives are, and how to avoid failure. 1.3 People involved in a website This section describes functional groups and user roles which are typically brought together in a collaborative environment when building a website. 1.4 Web content management and IBM Web Content Manager This section explains the concept of web content management and what IBM Web Content Manager offers. 1.5 Key new features in IBM Web Content Manager V7.0 This section describes key new features for IBM Web Content Manager Version 7.0. DISCLAIMER: This guide outlines an example of building a basic website using a sample site, River Bend. This sample is not intended as a best practice for development, configuration, architecture, or any other aspect, such as scalability or performance. No warranty or support is implied for the example site or sample code used.

1.1. Introduction to this guide


In today's global business world, businesses depend upon their visibility in their respective marketplaces. With the pervasiveness of the Internet, the web has become a primary delivery mechanism of this visibility. Worldwide, organizations use the Internet to deliver their presence, from basic organization and company information to e-commerce. The web is a sophisticated and key tool. IBM Web Content Manager (WCM) provides a sophisticated web content management tool and platform that is designed to accelerate the delivery and management of critical business information. It enables a collaborative approach to content creation for individuals and teams. It allows for approval of processes, management, and assets. WCM is an extremely powerful and sophisticated tool that is remarkably easy to use. This guide addresses specific technical aspects of the WCM product, by discussing its underlying architecture, features, and capability. This guide focuses specifically on WCM V7.0, but much of what is discussed here applies to earlier versions of the product as well. To support users in the initial stages of learning about the product, this guide explains how to build a sample site from the initial concepts to asset creation and final delivery. To illustrate the steps in building the site, we build the sample site for the fictitious company, River Bend Coffee and Tea Company (River Bend). The guide then expands upon this experience and explores additional and more sophisticated areas of the product, including where there are opportunities for customization. In addition to discussing

6 of 439

specific technical features, this guide discusses the key concepts and best practices for creating an accurate information architecture and site framework. DISCLAIMER: This guide outlines an example of building a basic website using a sample site, River Bend. This sample is not intended as a best practice for development, configuration, architecture, or any other aspect, such as scalability or performance. No warranty or support is implied for the example site or sample code used.

1.2. Website fundamentals

1.2.1. Basic concepts within a website


Basic concepts within a website includes website, web page, home page, links, and content.

Website
A website is a collection of all of the text, graphic images, links, sounds, and other content elements that make up a presence on the web. The goal is to present content and information in the most dynamic, up-to-date method possible. Each individual document is called a web page. Web sites have three basic components: A home page - The home page is the top-most page in a web site. Web pages - Local and remotely stored web pages linked to the home page. Content - Content includes text, graphic images, and sounds.

Home page
A web site's home page is the first page that users see when they access a web site. It creates the first impression for users and sets the tone for organization and content in the site. A home page usually contains a header at the top that gives the name of the source for the site. Some headers are very simple and contain only text, while others have designs that incorporate graphic images.

Links
Users access local and remotely stored web pages linked to the web page by clicking on links. Links can: Take users to other web pages at the same site. Move users to other web pages at different sites. Jump the cursor to another place on the same page. Cause a file to be downloaded or copied from the website to the user's computer. Connect the user to other Internet resources, such as e-mail.

7 of 439

Content
Content is the substance of a website. It can take many forms, including: Text documents Graphic images Sounds Downloadable movie clips Links to other related sites

1.2.2. Why building a web site


The goal of a website is to provide up-to-date, accurate information and content for customers, partners and employees of your organization. When managed effectively, a website provides an excellent platform for providing information to a broad audience, with the ability to rapidly update and modify this information as needed. Business moves quickly: Promotions come and go, prices change, product features are added, and new opportunities arise. A successful website can ensure that the best and most relevant information is shared with key stakeholders. A valuable website provides informationnot just data. There is a continued explosion in both content volume (numbers of items) and content types (documents, images, streaming media, instant messages, e-mail and so on). IBM Web Content Manager software helps you structure your ever-growing data.

1.2.3. Setting objectives and measuring them


After you have defined the goals of a website, it is important to have metrics and mechanisms in place to determine if your site is providing benefit and serving to achieve the goals you have defined. Define your metric of success. Is it simply to achieve certain number of hits to the site? Can customers navigate to the information they need with minimal clicks? Can they place orders in an intuitive way? Your organization needs a method to measure the number of clicks required for basic navigation, the duration for which potential customers stay on the site, and if they find what they need.

1.2.4. Why websites fail


Delivering a website (Internet or intranet) that makes a mark with its target audience is becoming more challenging than ever before. Why is this? This change can be partially attributed to a growing number of users called "digital natives". They are people who have grown up with technology such as the Internet, digital cameras, and computers. This group expects more from a website than just static information that is poorly laid out and difficult to find. This group speaks digital as though it were a second language. But digital natives are not the only reason for this. There are many others.

8 of 439

Today, the web is used as a natural medium that allows individuals and business to conduct transactions, especially the buying and selling of goods and services. Businesses use websites and portals to deliver efficiencies, with faster access to information and people and easier consumption of knowledge and education. In essence, there is much more reliance upon the web and websites than there could have ever been realized five to ten years ago. Why do websites fail? They fail because organizations do not acknowledge or understand their target audience, the needs of the consumer, or the need to deliver information at the right time, at the right place, with the right method. They also fail for the following reasons: Not understanding the businesses needs Web sites fail because the organization loses sight of their objectives and the businesses needs. Neglecting to keep objectives in focus can easily lead to a website existing just as a digital business card when really it is meant to deliver additional traffic through their outlets and drive additional sales online. A website must meet the objectives of the business and align with its target audience and what they want. Not having the right balance of the website design and content With a few exceptions, the balance of design versus content must be maintained. Too much in either direction might mean that the website is perceived as looking great but with no substance or value, or as a great source of information but difficult to use. Content and design are key elements for ensuring that the initial experience and perception of the website is good and that repeat consumer visits can be expected. Not having new content to attract repeat visitors Content is king. Whether for textual, applications, video, and audio reasons, consumers of a website revisit because their initial experience was good and their expectations were met. Consumers of the site will only return if the site is updated with new content. A consumer might look elsewhere when the content shows signs of being out of date or no longer relevant. Maintenance of the site especially its content is key to its success and should be planned and budgeted for as part of a website project. Not marketing and linking the website to attract new visitors Failure to market a website in either a traditional or digital marketing sense only leads to a failed website. Consumers visit websites through a number of mechanisms such as word of mouth, agencies, magazines, other Web sites, or search engines. Expect to use one or more of these avenues to publicize the site especially if it is within a competitive market. Not understanding the audience to better serve them Understanding the usage pattens and how many visitors you might expect to see on the site at any peak time can be difficult to estimate, but is important. If the site is designed to accommodate hundreds of users in a peak hour, when the actual number is in the ten thousands, this can lead to the website being slow and unresponsive. If more users stay on the website longer, perhaps reading or watching more or due to the slow response time, then this might result in the total visitor concurrency number to be higher than expected. Therefore, the experience for the visitor might become unpredictable. Understanding who the audience is, what they will be doing on the website, and how they might be using the website are keys to ensuring that a website does not fail.

9 of 439

While websites fail for other reason also, focusing upon these five areas help to ensure that the website has a healthy start.

1.3. People involved in a website


This section describes functional groups and user roles which are typically brought together in a collaborative environment when building a website.

1.3.1. Introduction
Building and maintaining a website using a content management system such as IBM Web Content Manager (WCM) is not a task to be undertaken by a single individual. It is not that this is an impossible task, rather this task requires skills, experience, and knowledge that usually come from many individuals working in a collaborative environment. Typically, we bring together individuals from three areas (business, technology, and information) and four distinctive groups (business, technical, content, and design (or layout). Depending on the size of the business and situation, it is possible for the same person to be split across positions in these groups. The functional groups represented include: Business Technology Information The specific user roles include: Business owners Corporate communications and marketing personnel Graphic designers Information architects Infrastructure engineers and operations Content authors, subject matter experts, and approvers Consumers

1.3.2. Functional groups


The functional groups consist of business, technology, and information groups. Expanding on these functional groups, it shows the areas where skills, experience, and knowledge are needed.

Business functional group


The members of this group typically see the business vision for a website and chart its progress to meet this vision. They know the line of business requirements, define the success criteria of the project, and can help to define the underlying information architecture. From the business process perspective, they can identify where the current barriers exist that need to overcome with this project.

10 of 439

Typical members of this group include members of the management board, a project sponsor or sponsors (which is sometimes shared), business owners, and process leaders.

Technology functional group


The members of this group represent multiple areas that touch all aspects of general IT, from infrastructure and network architecture to specialized Internet Service Providers (ISPs, hosting providers). Members of this group are proficient with the business defined technical architecture and have a solid understanding of the technical requirements of the website. Typical members of this group include members of the IT and architecture board, IT management and experts from third parties (ISPs and CMS technical experts if skills do not already exist), infrastructure engineers, and operations.

Information functional group


Within the information functional group, it is important to split it into (1) content generation group and (2) content design and layout group. This is an important concept within Web Content Manager.

Content generation group


The members of this group represent the subject matter experts, authors, content owners, and the target group for whom the information is intended. Members of this group are extremely important because they have a deep knowledge about existing application resources and content that needs to be integrated. Typical members of this group include representatives from the various specialized content areas of the business (products and within, marketing, corporate communications, and so on).

Content design and layout group


The members of this group represent the delivery, styling, and management of the visual elements within a Web site. They specialize in delivering a complete user experience (UX) that is easily consumed by visitors, while maintaining a consistent corporate style across the website. In this way, visitors can glean the information and knowledge required. Typical members of this group include web layout designers, developers, UX subject matter experts, and associated test groups.

Communication and collaboration among the groups


With the three main area and their functional groups defined, the communication and collaboration between these groups must stay at a level where there is always a clear understanding of where responsibilities lay. In addition, these groups must clearly understand and work toward the goals of the website. A good practice to keep these groups collaborating effectively is to have frequent interaction among them as illustrated by the following figure.

11 of 439

Note: These groups are key to building and maintaining the process and groups that persist along with the longevity of the website. While omitted here is the consumer or visitor, this group is vital for obvious reasons and can be logically grouped with the design or layout team because they will be responsible for the experience provided by the website. We talk about the consumer in a another section.

1.3.3. Roles
The user roles consist of business owners, corporate communications and marketing personnel, graphic designers, information architects, infrastructure engineers and operations, content authors, subject matter experts, and approvers, and consumers.

Business owners
As mentioned previously, the delivery of a content management system-based website is one where we can typically bring together individuals under four distinctive groups that collaborate together on a single goal, for the website. The business group has the vision for the website. They know the line of business requirements and can define the success criteria of the project among other responsibilities. Members of the management board and executive team perform the following tasks: Set and announce the key business objectives. Set the business context. Define the project sponsors (because this can be shared). Authorize the process leaders. Set the project budgets and the time line. The project sponsor or sponsors (part of the organization that is driving the project) perform the following tasks:

12 of 439

Work with business owners and content owners to define the information architecture. Define key concepts and terminology. Steer the decision process. Manage the project.

Process leaders perform the following tasks: Manage the project. Define the resources that are required. Work with business owners and content owners to define taxonomies that categorize and organize information for both the content creator and the content consumer. These tasks are closely related to the underlying information architecture.

Corporate communications and marketing personnel


A superset of the content group is corporate communications and marketing personnel. This group is responsible for ensuring that the messages, products, and general information that are delivered to the consumer are consistent, well defined, easily digestible, and clear overall. Corporate communications and marketing individuals might make up some of the people who are already defined as part of the content group or, in some cases, provide direction from a higher level. The corporate communications and marketing team performs the following tasks: Ensures information consistency. Verifies that the general delivery of the product, service, or corporate information is clear. Approves information style and language, as well as access.

Graphic designers
The design and layout group is responsible for delivering the complete user experience for the website visitor. The responsibilities include layout, styling, corporate branding, and accessibility, for example, in addition to the areas mentioned in the following list. The design, layout, and development team performs the following tasks: Helps to create and stamp the corporate design on the website. Ensures that styling and layout provide a flexible user experience for the visitor. Liaises with subject matter experts where necessary to address accessibility needs. Works with the IT team to technically implement the corporate design. Helps to create the author's template environment.

Information architects
Aligned with the group for IT, the information architect (sometimes known as information designers ) team closely works with individuals from the group and are responsible for the delivery of the structure to the content, categorization, placement, and alignment with the visitors' expectations of information placement. Content information architects perform the following tasks: With the design team, ensure the best fit and alignment with the visitors' mental model of information.

13 of 439

Help define the taxonomy in association with the content authors and subject matter experts. Define the content structure and groupings with the design team.

Information architects can be seen as an extension of the design and user experience group. Because common elements are shared across both areas, it is important to keep communicating and working in a collaborative partnership.

Infrastructure engineers and operations


The infrastructure engineers and operations team is part of the wider IT group and is responsible for ensuring that the systems are put in place and maintained according to corporate standards. These standard typically fall into two areas: systems (the underlying software stack, for example, the application server) and network (the architectural guidelines of how system communicate or do not communicate with each other). The infrastructure engineers and operations team performs the following tasks: Designs the content management systems to fit with previously defined network and system architectural standards. Establishes processes to monitor and maintain the system. Works with the business to align budget with standards (resilience, scalability, and so on).

Content authors, subject matter experts, and approvers


Content is gold. Without it, a website ceases to be beneficial to visitors. As such, the content team is responsible for ensuring that content is created, categorized, quality assured, and approved to be visible on the website. Content authors, subject matter experts, and approvers perform the following tasks: Provide content expertise and writing. Help define the taxonomy with the information architects. Help define the content structure with the information architects. Provide first-level template support. Content owners perform the following tasks: Provide content quality assurance (accuracy, relevance, and so on). Provide usability feedback. Approve content.

Consumers
Today, information, products, and services are acquired over the Internet through websites that are built with Web Content Manager. Web sites are a vehicle to unite consumers with products or information, and as such, the consumer plays the lead role. Consumers switch between competitive websites with the click of a mouse button if they do not find what they want within seconds of their visit. This is also the case with procurement of services and products. Sales are quickly lost if a consumer's mental model of how their interaction should take place is not aligned with how the website works. Clearly, consumers are important. For new websites, all consumer feedback is important. Getting the website wrong costs time, money, and consumers' trust. However, there is difficulty with getting it right the first

14 of 439

time if you do not have user feedback to work with. The question is: how do you get that feedback before your website goes live? There are several answers to this question. One that stands out is to solicit the expertise of user experience, information architects, and user centered practitioners, along with a targeted sample of willing participants from the general community. This is typically a standard practice among the methods used by these professions. For websites that are already in place and perhaps transitioning to a new experience, such as a portal or new design, it is becoming common practice to offer certain groups within the websites' core user base to have access to a live beta version of the site to gain feedback. This approach can be advantageous where there is a need to ensure business as usual. Consumers in a role that assists the organization perform the following tasks: Provide live and relevant website feedback. Can validate use case scenarios, check, and balance. Help eliminate overlap and misinterpretations of new design elements. Provide usability feedback, crucial with accessibility. Approve content. These roles and their functions are typically brought together in a collaborative environment when building a site.

1.4.Web content management and IBM Web Content Manager

1.4.1. Web content management within the context of content management


What is content?
Content can mean many different things. We start from a common understanding of what the scope of business content is. Content supports the work that the enterprise does and interacts in many ways with business operations. Enterprise Content Management (ECM) is the discipline involved with the capture, storage, and management of this kind of content across the enterprise. It makes information easy to find, use, update, and discard when the time comes. Content can be categorized into the following types among others: High-volume production content, such as document imaging and computer output, archiving, and presentation Rich media, such as audio, video, and photos Web content, such as Internet, intranet, and extranet Collaborative content, such as office documents, discussions, and e-mail

15 of 439

Enterprise content management has the following objectives: Provide an efficient and secure solution for managing content within the enterprise, including enterprise-wide content storage, access, search, distribution, and retention. This is especially true with the current focus on corporate accountability and regulatory compliance. Build knowledge-based environments to leverage corporate know-how and expertise.

Importance of content management


Prior to discussing the specific aspects of the importance of web content management, we begin by discussing the underlying importance of content management. The ability to effectively manage content, and more importantly information and specific knowledge, directly affects your organizations ability to succeed in the marketplace. Business information is, in most cases, the most valuable asset that you offer to your customers, employees, or business partners. Accordingly, that makes information, together with the ability to manage it, integral to the success of every business. Value is the knowledge that you add before you offer something. Business value is based on the information that you share. This concept is true both for the production and for knowledge and service industries. Looking at where this information exists, you find that it is often divided and decentralized throughout organizations. Information is stored frequently as content. For example, critical information can include product descriptions, instructions, policies, key customer issues, competitive strategies, and so forth. The effectiveness of the information you offer, and in many cases the value that you provide, depends directly upon the ability to distribute that information in a timely and efficient manner.

Information within the context of web content


When your organization offers information via a web browser, this material is considered web content. Web content consists of two parts: The content The design or presentation of that content Going forward, we explain this concept in greater detail and discuss the advantages of handling the content and the design of the content separately. There are two approaches to creating, managing, and publishing web content: Static web content Dynamic web content Static web content Static web content is embedded directly into the design and placed statically on a web page. This type of content is most likely the result of programming rather than content authoring. Due to its static nature and embedded design, this type of content can be difficult to reuse and change. Static web content solutions often require someone within an IT department, or a person who possesses web design and some web IT skills, to translate content into HTML before it can be posted to a web site or a portal. Accordingly, static web content is more difficult to use within a dynamic web site, which changes frequently and requires up-todate information to deliver maximum value. Additionally, static web content is often impossible to reuse due to its embedded design.

16 of 439

Dynamic web content Rather than embedding the information directly together with the design, dynamic web content treats the content and the presentation of the content as two distinct entities. By separating the web content from the presentation layer, you can manage and deliver content quickly and efficiently, independent of its presentation. The ability to manage both content and its presentation layer as separate entities is enabled most frequently by using web content management systems. With IBM Web Content Manager, companies or organizations can put the information in the right people easily and efficiently, which is a key component in sustaining a competitive advantage. Authors do not need to handle the technical side of web technologies. Content that is created can be integrated with multiple uses and processes, distributed or shared throughout and beyond an organization. For example, a single product sheet can contain complete pricing information, including internal prices that you only share within your organization. By taking advantage of the multi-publishing feature, you can publish a subset of the same document for your customers, without needing to maintain separate documents.

Content management within the context of applications


Applications offered through a web browser also use content that is managed by a content management system. For example, a product catalog or online store contains content that is accessed through an application that usually provides a helpful navigation tool. With ever-growing volumes of critical information distributed across Internet portals, e-business applications, intranets and extranets in various formats, deploying and maintaining effective content management can be a significant challenge. Web content management is not just about customers. It is important to employees, business partners, suppliers, and vendors because these groups represent the backbone of an organization. Making sure that they are equipped with the right information and can do business with your organization more easily than they can with your competitor is critical. A positive web experience motivates users to revisit the site like nothing else can. This is a challenge that is generally underestimated by most companies. To compete in today's markets, providing information on demand is crucial. Content management is the key in this requirement. Such a powerful management tool, reaching a wide-spread audience, also exposes the risks that are associated with providing information to a broad audience. Make sure to include workflow, security, and structure to reflect organization policies in a web environment.

Overview of web content management


In the past, different forms of information, such as web content, e-mail, product information, or customer data, were kept in separate, disconnected content management repositories. Today, this is not a viable solution. To thrive in an on-demand environment, you need flexible, cost-effective content management solutions to manage all types of information, including structured data and unstructured content. You need content management solutions that enable data and content to be integrated with multiple applications and processes, distributed or shared throughout and beyond your organization. Furthermore, you need it structured and organized in a way that is best suited for your business.

17 of 439

The focus for today's businesses


To manage the exponential growth of business-critical information, respond faster to the market place, and increase employee productivity, a content management system must address three key areas: Responsiveness Streamlining operations and providing an integrated view of all forms of information can improve your customer relationships and enable your employees, partners, and suppliers to work together more efficiently. It can also help you reduce costs and capitalize on new opportunities. Productivity When employees spend more time looking for information they need to perform their jobs, such as documents, e-mail, reports, web content, they spend less time working and generating business. If they are not working with the latest information, they can miss opportunities and make costly mistakes. When customers cannot find what they are looking for on a web site, they leave frustrated and dissatisfied, no matter how good the information or prices might be. That can add up to a lot of wasted hours and missed opportunities. The effort to bring visitors back again is costly. Companies that give their employees a simplified, personalized, and easily accessible user interface to access and share critical information enjoy a competitive advantage. Compliance Effectively manage your content to address the increasing demands of government and industry regulations. Keep focused on your business goals and use compliance as a lever for change to affect process improvement and business transformation.

When looking at existing enterprises, specialized applications and databases are often established when it comes to business-critical information. IBM Web Content Manager becomes increasingly important for companies and organizations to leverage the complete spectrum of data assets within their enterprise and share it electronically among suppliers, customers, partners, and employees. Content that is created and managed from authors for the purpose of web publishing becomes only one component. Enterprise Content Management (ECM) provides a basis for the next generation of data management, enabling customers to collect, manage, and distribute all forms of business information. For example, an employee of a human resources department who updates a phone number in an internal application, has actually executed a step within a greater content management context. The changed number is simultaneously published to the web. It is mandatory to integrate content from a broad range of existing data sources. Open standards for content exchange are the key.

1.4.2. General concepts in web content management


In this section, we define concepts that are fundamental to understanding web content management and, more importantly, understanding the benefits that can be gained. The concepts include the separation of content and presentation, content creation and authoring, workflow, management, content publication, content aggregation, content integration, and content delivery.

18 of 439

Separation of content and presentation


As a foundation for understanding the benefits of IBM Web Content Manager, we must first distinguish between content and the presentation of the content. When a clear separation is made between content and how it is presented, you can understand how a single piece of content can potentially be rendered in multiple ways. For example, a single item of content, such as a news article, can be presented in any of the following ways: On a web page in a variety of formats, based on user preferences and personalization In a PDF file Downloaded to a smart phone Streamed as an RSS feed The content is the same, but the presentation can be adapted to best meet users' needs within the context of their specific roles or preferences. This approach also guarantees a consistent view and usage of a web site. If the design changes, the content parts remain unaffected. Additionally, the content creators do not have to worry about the presentation of their content. This is important because content creators usually do not have significant knowledge of HTML. Moving forward with this idea, key concepts and functional areas that apply to IBM Web Content Manager can be grouped in terms of dynamic presentation or content management.

Content creation and authoring


Content creation and authoring refer to the creation of content and information that is intended to be delivered on the web site. Content creators are guided through an authoring process, by using familiar applications, without having to learn new technical skills.

Workflow
The accuracy, relevancy, and recency of content is assured by automating the content life cycle, from creation to review, approval, delivery, and archival.

Management
Content becomes an asset as control of the web site is placed back in the hands of the users who understand the subject and customers best.

Content publication
After content is authored and approved, the content publication stage is where the content is released for delivery to the live site. The delivery can be a simple process, such as making a file available on a file system to a web server and advertising the URL. Or it can be a more complex procedure such as moving content through a complex workflow and into a production environment.

19 of 439

Content aggregation
Content aggregation occurs when content from various sources is brought together. In a simple web site, this occurs manually during the content creation phase. In a more dynamic and data-driven environment, the aggregation occurs at an application server level.

Content integration
Aggregation, transactional integration, and performance enhancing caching enrich the user experience.

Content delivery
Content must be delivered to the user in the appropriate (or desired) format. Most frequently, this implies delivery via HTTP by using browsers and similar devices. Alternatively, content delivery can refer to other publish-and-subscribe methods, data feeds, or web service protocols.

1.4.3. The need for a web content management system


It is a standard practice for most organizations to use a web content management system to assist with the process of delivering content to their intranet or Internet site. Consider, for example, a product page that details the features and advantages of a new coffee maker. The creation of the detail description and images can involve several people, including subject matter experts, image designers, proof readers, legal, and IT. If we achieve this through existing desktop office tools, it can be a quite arduous and time consuming process. If you use a web content management system, the process can be streamlined to allow distributed authoring, workflow, preview, and delivery of the finished article to the web site, and notification of the appropriate people. Without content being current, timely, and appropriately placed, the site can be perceived in a lesser light. From the content delivery process alone, a web content management system is a good choice. With the content creation, approval and delivery process being the top capability that benefits from a web content management system, there are other areas that can lend weight to using a web content management system. Ensuring that the web site has a consistent look and feel (branding) is extremely important, for brand awareness and for ensuring that visitors to the web site are familiar with the layout, presentation, and navigation to content. A web content management system provides a structured approach and framework to allow the separation of content and design while ensuring consistency where required. Componentization is also an area that the web content management framework offers. Componentization allows a higher degree of reuse and helps you to build more with less. This is another clear area where a web content management is a good choice.

20 of 439

Content and design are just two important aspects of any web site (intranet or Internet) that benefit from a web content management system. The following aspects are important to a web site: Content: The creation, approval, and delivery process streamlined to take advantage of your organization's distribution of knowledge and skills. Design: Separation of design from content to allow for the design process (in-house or agency) to deliver consistent branding of your business, its products, and services. Componentization: Reuse of assets to allow the business to deliver more with less, and save money. Standards: A system to employ best practices where accessibility is required. Integration and delivery: Providing a framework from which a business can integrate with systems, services, and information including growth from Web sites to portals and beyond.

21 of 439

With these concepts in mind, you can be reassured that you are making the right decision to use a web content management (WCM) system. While there might be many factors to consider, the following decision tree can guide you and provide a starting point to expand upon.

22 of 439

1.5. Key new features in IBM Web Content Manager V7.0


IBM Web Content Manager (WCM) has added many areas of improved functionality in Version 7.0. This section describes some of the key improvements in Version 7.0 of the product.

1.5.1. Improved authoring user interface views


The Web Content Manager Version 7.0 authoring portlet has been revamped for a cleaner and more user friendly experience. There have been many improvements. Here are just some of the improvements.

Library Explorer navigation


The Library Explorer navigation allows for quick access to some of the views within the authoring portlet:

23 of 439

Different view structures


Within the authoring portlet navigation, you can choose between flat or tree views: Flat view:

Tree view:

24 of 439

Improved quick navigation


Along the top of the navigation within the authoring portlet, users now have access to a mechanism for more quickly navigating through the items within the libraries. This allows for more user friendly experience.

25 of 439

Improved filtering capabilities


When navigating through many items in the same view, it is often easier to find what you are looking for by filtering the items within the view. Web Content Manager has added an improved filter selection interface:

Favorites
The updated authoring portlet allows users to select favorite items and views. This makes it easier to access these items in the future. To mark an item a favorite is very easy. The heart allows you to select and deselect an item as a favorite.

1.5.2. API enhancements


There have been various enhancements to the Web Content Manager API in version 7.0.
Check the Web Content Manager API javadoc

for the full list of operations available in the

Web Content Manager API.

Syndication API
Web Content Manager now allows some syndication operations to be performed using the Web Content Manager API. Users can retrieve status, view the numbers of items in the last syndication event, push an update or a rebuild event to the syndicator and subscriber objects.

26 of 439

Query API
Web Content Manager Version 7.0 has added a great deal of functionality with the new query API. It is now possible to retrieve Web Content Manager objects using the API by creating queries to run against the repository. In the past versions, you could do very simple retrieval such as selecting by exact name or all items of a specific type. Now, there are many more options of how to retrieve items, as well as the availability to sort the results.

Custom plugin API


Web Content Manager Version 7.0 has added the ability for custom plugins to be used to allow for extended functionality. Plugins can be created to provide custom workflow actions, validation plugins for file attachments, custom localized text during authoring, and plugins that can be used during rendering.

1.5.3. Projects and folders


One of the great new features that has been added to Web Content Manager is the ability to group items in projects and folders. Folders is a way to group items within the authoring portlet. You can group authoring templates, presentation templates, and library components within folders. This makes managing content easier for authors, as it is possible to group items within the same library under folders.

Projects on the other hand provide more than just the ability to group items in a common location. One of the difficulties that content authors have had is the challenge of publishing a group of items all at the same time. For example, if you have an announcement concerning a new product launch, there may be many Web Content Manager assets that are related to this announcement. It may be difficult to line up all of these items to publish at the same time, because some items may have to go through workflow and some do not, so it is not possible to set future publish date. Also, there is no guarantee that all items related to the announcement would be ready by announcement time. Projects solve this problem by allowing multiple items to be placed within the same project. Then, when the condition to publish the project is complete, all items within the project will be published. The project owner has control over how the project will be

27 of 439

published, whether manually, automatically (when all items in the project are pending publish), or based on a specific date. See the infocenter for more information on Projects.

1.5.4. File resource based content objects


There are times that content administrators will want to use menus to return links to both content and files. With Web Content Manager Version 7.0, it is now possible to create an authoring template that will return the link to the file embedded into the content, instead of the link to the content, when the content is returned by a menu, navigator, search result, or link to the content. The end result of this is that links directly to the embedded file resource element can be returned instead of the link to the content itself. This functionality is useful when trying to generate lists of links to files stored within Web Content Manager.

1.5.5. Taxonomy based option selection elements


When creating content in Web Content Manager, authors have the ability to profile these items with categories. In the past, there was no way to modify the way that the category selection dialog was built. In order to aid with that, Web Content Manager has added the ability to tie option selection elements within a content object to Web Content Manager categories. This allows for easier selection of categories by the content authors, and also allows customizing the selection element by using a custom JSP within the element.

1.5.6. Workflow enhancements


Workflow has always been one of the main strengths of the product. With Version 7.0, additional functionality has been added to make using workflows even more powerful.

Multiple drafts
In Version 7.0, Web Content Manager now allows content authors to create more than one draft version of a published object. In the past, only one draft object was allowed at a time. Now, you can have multiple drafts of the same workflow item:

28 of 439

Reject to prior stage


Since its inception, Web Content Manager has allowed workflow items to be rejected. However, that always meant that the item would return to the first stage in the workflow. Now, workflows have been enhanced to allow content to be sent back to the prior stage, instead of only back to the first stage in the workflow. You will be able to sent to the prior stage or still reject or restart the workflow. To use this functionality, the workflow stage must be configured to allow items to return to the previous stage:

See the infocenter

for more information on the previous stage button.

Workflow API methods for non-content items


In addition to the workflow enhancements that have been made to Web Content Manager, the API has also been extended to allow workflow operations on non-content items. In the past, any non-content item that went through workflow would not be able to be modified using the Web Content Manager API. In Version 7.0, however, it is possible to perform workflow operations on non-content objects using the Web Content Manager API.
Check the Web Content Manager API javadoc

1.5.7. JSR286 portlet features


The web content viewer portlet for Web Content Manager Version 7.0 is the JSR286 version of the portlet. This portlet has several enhancements over the standard API version, which has been deprecated in Version 7.0. Some of the enhancements include:

WSRP
In the past, to retrieve content from a remote Web Content Manager server involved the Web Content Manager remote rendering portlet. This involved additional configuration above and beyond a typical portlet configuration. Now, the JSR286 portlet can take advantage of WSRP to retrieve content from a remote server.

29 of 439

Friendly URL
The JSR286 portlet allows for friendly URLs to Web Content Manager content to be processed and rendered through the portlets. Constructing Web Content Manager friendly URLs is a powerful and complex to explain. Check the infocenter information on this process. for more

Portlet caching
The JSR286 portlet can store information in the portlet cache. The portlet configuration allows administrators to determine what caching options will be used for a particular portlet, including the cache timeout behavior, and whether the cache should be shared across users, or specific to individual users.

1.5.8. WebDAV
Web Content Manager has added the ability to manipulate some items within Web Content Manager using WebDAV. This allows you to create, delete, and modify Web Content Manager assets using operating system tools, instead of using the Web Content Manager authoring interface.

1.5.9. JMS
Web Content Manager has added the functionality of generating JMS Messages to allow for notification of various events within Web Content Manager. This allows applications to be alerted when specific actions take place within Web Content Manager, mostly items being changed. Check the infocenter Content Manager. for more information on enabling JMS within Web

1.5.10. Configuration changes


In the past, Web Content Manager stored its configuration within configuration files for the various services. In Version 7, this has been moved to be stored within WebSphere Application Server, within resource environment providers. This makes it easier to access and change configuration parameters.

30 of 439

31 of 439

Part 2. Architecture and design


Part 2 covers the following topics: 2.1 Product architecture and key components This section provides an overview of the IBM Web Content Manager (WCM) product architecture and introduces its key components including the WCM Server, content repository, authoring portlet, connect portlet, rendering portlet, and public API. 2.2 Architectural frameworks for content The architectural frameworks for content in WCM consist of portal, traditional, internal facing, and external facing. This section describes the various architectural frameworks for content in WCM. 2.3 Information architecture and site design This section describes defining, planning, designing information architecture and site interface. 2.4 Design and layout This section discusses design and layout of a website. Specifically, it addresses content usability and accessibility as it pertains to a site interface. 2.5 Environment type With WCM, a variety of environment types are supported to facilitate the building, staging, and finally delivering of websites. This section describes the various environment types, their usage, and how to move content between them using workflow and syndication. 2.6 Sample physical architecture of a website This section describes various physical architectures you can use to build a WCM website infrastructure. 2.7 Use case sample site infrastructure: River Bend Tea and Coffee Company This section combines all the concepts that are described in the environment type and sample physical architecture of a website sections and build an example infrastructure for the River Bend Coffee and Tea Company (River Bend). DISCLAIMER: This guide outlines an example of building a basic website using a sample site, River Bend. This sample is not intended as a best practice for development, configuration, architecture, or any other aspect, such as scalability or performance. No warranty or support is implied for the example site or sample code used.

32 of 439

2.1. Product architecture and key components


This section provides an overview of the IBM Web Content Manager (WCM) product architecture and introduces its key components including the WCM Server, content repository, authoring portlet, connect portlet, rendering portlet, and public API.

2.1.1. Product architecture overview


The IBM Web Content Manager 7.0 application is fully integrated with WebSphere Portal 7.0. As such, all required components of the IBM Web Content Manager application are installed with WebSphere Portal 7.0. The following figure shows the high level overview of where IBM Web Content Manager fits into the WebSphere Portal infrastructure.

The key components in the architecture figure above are explained as follows.

2.1.2. Key components of WCM


WCM consists of the following key components: WCM content server WCM content repository WCM authoring portlet WCM connect servlet WCM rendering portlet WCM public API

33 of 439

WCM Content Server


The IBM Web Content Manager Server is the core of the IBM Web Content Manager application. All requests for content are ultimately processed by the content server. The WCM Server leverages Virtual Member Manager as its user repository. This repository is used for both authentication as well as determining group membership for authenticated users.

WCM content repository


When you first enable WCM, it uses WebSphere Portals embedded Apache Derby database as its content repository. If necessary, you can switch your WCM content repository to any of the supported databases listed at https://www-304.ibm.com/support/docview.wss?uid=swg27007791 Note: If you choose to store your content in IBM Content Manager you can still reference items stored in IBM Content Manager within WCM using the Federated Components. As the list of supported databases is subject to change, refer to the WebSphere Portal 7.0 product documentation for details on the latest supported versions and platforms, which is available at:
https://www-304.ibm.com/support/docview.wss?uid=swg27007791

In addition, refer to each product's documentation for details on the specific hardware and software requirements for these databases.

WCM authoring portlet


The user interface for working with WCM is provided via a portlet running within WebSphere Portal. The WCM authoring portlet is the user interface for interacting with WCM. Content creators use the portlet to create (author) content. Content approvers use this same portlet for managing the content. The website developers use this portlet to create technical assets, for example, presentation templates, workflows, and syndication components. The authoring portlet supports granular user interface security controls.

WCM connect servlet


The WCM connect servlet is used to deliver web content outside of a WebSphere Portal environment. Use this servlet when you need to deliver a traditional stand-alone website. Site visitors can access content by requesting the HTML directly from the connect servlet. Important: Even if you only use the connect servlet to deliver stand-alone (non-portal) websites, the core WCM application always runs on WebSphere Portal.

WCM rendering portlet


WCM provides web content viewer portlet (JSR 286) that can display content in WebSphere Portal. This portlet requires no Java coding - only simple configuration by the portal administrator.

34 of 439

The web content viewer portlet (JSR 286) can be configured to display web content on the same portal server as the instance where WCM is installed or configured to display web content on a different portal server than the instance where WCM is installed. The following link explains how web content viewer (JSR 286) portlet can be configured to render content residing on a remote WCM Server:
http://www10.lotus.com/ldd/portalwiki.nsf/dx/Rendering_Web_Content_Viewer_portlet_consumed_from_Rem ote_IBM_Web_Content_Manager_V7_using_WSRP.__Setup_and_troubleshooting_guide.

Tip: Be aware of your infrastructure when using the web content viewer portlet (JSR 286) to render content residing on a remote WCM server.

WCM public API


While WCM provides a solid set of web content management capabilities out-of-the-box, there are times when the standard capabilities of WCM do not meet your exact needs. For situations such as this, WCM provides a Java API. Note: WCM API does not expose all the capabilities of WCM. Review the JavaDocs for a complete set of the features available using the API. The Javadoc HTML files are located under the was_profile_root\installedApps\nodename\wcm.ear\ilwwcm.war\webinterface\ folder. In this path name, was_profile_root is the profile root for WebSphere Portal Server. For example, these files are found on our server at: C:\IBM\WebSphere\wp_profile\installedApps\wc01\wcm.ear\ilwwcm.war\webinterface\api -javadoc Restriction: WCM API only supports Java code running in the same Java Virtual Machine as WCM itself. If you wish to access the WCM API remotely, you will need to build some type of service layer on the WCM server to broker your requests. The most common solution to this issue is to develop a web service to perform this function.

IBM Web Content ManagerJavaServer Pages Tags


In addition to the Java API, IBM Web Content Manager provides a JavaServer Pages Tag Library that you can use when developing portlets and other J2EE applications. The tags in this library make it very easy to access WCM content from a JSP page. These tags rely on the API for their functionality so they do not provide any capabilities beyond those of the API. Restriction: Because the JSP Tags rely on the WCM API for functionality, they must run in the same Java Virtual Machine as the WCM server. For more details on the API and JSP Tags, see the IBM Web Content Manager Product documentation.

35 of 439

2.2. Architectural frameworks for content


The architectural frameworks for content in WCM consist of portal, traditional, internal facing, and external facing. This section describes the various architectural frameworks for content in WCM.

2.2.1. Portal
Portal provides the basic framework services for content aggregation, role-based access, personalization, and security. The underlying J2EE platform provides low-level middleware services such as enabling security through a user registry and session management. These underlying services coupled with the basic portal framework services can provide content life cycle management in terms of content authoring and content delivery. Different roles, such as author, reviewer, and approver, can move content from authoring to delivery. The content management and delivery framework embedded in portal can be used in tandem with other features, such as personalization and content aggregation, which provides an effective presentation layer in the architecture. The portal framework allows the delivery of pages and sites that combine content from the CMS and other kinds of portal content from back-end systems.

2.2.2. Traditional
In the traditional architectural framework, content is prepared in pure HTML format by using different HTML editors, and the content is hosted on a web server for presentation. The URLs are exchanged with the reviewers and approvers for verification and validation over e-mail. The hosting platform does not provide content management. The dynamic applications came into existence with CGI scripts but had many limitations. The evolution of the J2EE platform brought new ways to display content on web sites: Static web content can be coupled with the dynamic content that is generated through servlets and JavaServer Pages (JSPs). However, the traditional framework still lacks in content management functionality.

2.2.3. Internal facing


Internal facing sites are sites designed for and used by the employees of an organization. Internal sites typically provide access to content and applications that employee access on a frequent basis. Often, key applications or content are delivered that attract employees to visit the sites. Such entities include news, alerts, and role-specific content. Intranet users can benefit greatly if the sites provide applications that are useful for dayto-day activities, such as sales management, defect tracking, customer relationship management, or technical support. The integration of Web Content Manager and Portal allows content to be interspersed amongst other portal artifacts (pages, portlets, gadgets and widgets).

36 of 439

2.2.4. External facing


External facing sites are sites designed for and used for by general public or partners of an organization. On external facing sites, the content should be clear, relevant and up-to-date and be easily and quickly accessed by users. Users' opinion of a website may directly influence the image of the associated organizations in the public eye. The site should be engaging and easy to use. Users want a site where the content they are looking for is easily found through navigation or search. The site should be fast and responsive, making use of caching techniques at various levels to enhance the response times for a variety of scenarios. A user may want to register with the site using a unique ID, content can then be personalized according to the profile of each user. The design of such a framework should consider how the content is managed, searched, cached, and personalized for users, with the goal of attracting and keeping the attention of the users.

2.3. Information architecture and site design


This section describes defining, planning, designing information architecture and site interface. When designing a website, always organize the site in a way that is easily accessible by users. The structure in which information is organized is called the information architecture. In this section, we describe an approach for determining the information architecture for the top levels of your web site. In IBM Web Content Manager (WCM), content is structured and organized within the site framework. The site framework can then provide navigation for the site. We outline the decision making process by defining the information architecture, describing key considerations,decision processes, and information design. Additionally, we describe how to define criteria for site acceptance. It is important to understand the relationship between the information architecture and the site framework. The site framework structures the information about a website and is closely integrated with the website navigation. To begin with, you define an initial site framework with primary and secondary site areas. The site framework is a prerequisite for the design and development of the content management system. In addition, you must develop an initial layout of the home page based on the primary and secondary site areas. Both the framework and the home page layout require review and validation with business stakeholders, from both an authoring and general site use viewpoint.

2.3.1. Defining information architecture


This section describes the concept of information architecture and provides an example of a good information architecture for reference. Easy access to the right content on an intranet can have a direct impact on an organization's overall productivity. If users can find the information they are looking for

37 of 439

almost before they are even aware that they are searching for the information, then you have accomplished the goal of organizing the information correctly and effectively for users. The primary reason for sharing information on a web site is to make it available for users. However, it is often the central reason why websites fail, which may also include the following reasons: Information is often voluminous and widespread over different divisions within an organization, making it difficult to maintain a consistent oversight of the structure of information and to determine a structure that is easy to understand and to use. There is rarely a single person or department with a consistent oversight of all the information that an organization wants to share. Information is used everyday, and as a result, it is often not obvious which pieces of information are most valuable or how they should be structured. By using a content management system, content providers can share more information and gain more experience, which can result in a strain on the original organization of the content.

The information architecture defines how the information on a web site should be organized and linked so that users can access content. An organization should investigate, analyze, design, and implement the information architecture for a site. Then, it must face the challenge of presenting an image that enhances the way in which the user experiences the information. There may be reasons why a specific path to information supports your business needs. The experience that a user has can be the key to success and often reflects the organizations philosophy. Frequently, an organization builds its success on a unique customer experience that cannot be ignored when architecting a web site. In addition, the audience can vary such that it becomes necessary to separate users into categories to provide a tailored experience for different types of users. For example, consider the following diverse offerings: A food company might offer both traditional, home style food and more contemporary fast food. A vehicle manufacturing company might have diverse offerings that range from passenger cars, to industrial trucks, to motorcycles, such as BMW. A technology company might offer a range of products and services, from technical consulting services to consumer electronics, such as Hewlett-Packard.

Because of this diverse range of products, brands may require their own web sites with a specific information architecture and web address (URL). In this case, a master (parent) web site, which includes links to seperate web sites to represent the specific branding, is the best choice. Defining the information architecture is often the most underestimated part of a content management project. Organizations frequently spend more time finding the right content management system than on developing the right information architecture for that system. When planning the information architecture, an organization must determine the following information: The hierarchical structure of the site The functionality that is required on the site The look of individual pages How to classify the content The flexibility of the architecture to allow the business to evolve

38 of 439

The information architecture determines the structure of the site, how navigation is derived, and therefore the ease of navigating the site. The following aspects of information architecture are considered when designing the content management system: Site framework Category hierarchy Document type hierarchy

Defining the information architecture lays much of the groundwork for how content is organized on a site. Regardless of where the content resides, you need a good understanding of what content needs to be presented. Tip: A good information architecture team includes representatives of all content areas that are included on the web site. It is also beneficial to have a single person lead the team who is willing to take a leadership role and to make the required decisions.

Basic examples of a good information architecture


When considering the information to share on a web site, we recommend providing direct access to the top levels of content. The top levels are the logical entrance to information and build the foundation of the information architecture. There are no strict rules governing what these top levels should be. Here, we present an example of a good information architecture and discuss the features that make these examples special. The examples discussed in this section include the sample River Bend Tea and Coffee website. The River Bend Coffee and Tea Company (River Bend) is a virtual company that we use for this wiki to give a simple example of a basic information architecture. This fictitious company sells coffee and tea in different locations around the world. They have a public Internet site to share information with their customers. These customers include both individuals and businesses. River Bend wants to provide each user a personalized experience of content based on their user profile. After each user registers on the site, they will have a profile that includes demographic and personal information that will allow the company to generate and display targeted campaigns specific to them. For example, three levels of customers have been defined: Tea Leaves for tea interested customers Beans for occasional coffee drinkers Big Beans for coffee connoisseurs

By using the profile information provided, along with additional personal information such as region, age, sex, and buying and viewing trends of the site, River Bend hopes to be able to increase revenues by making recommendations and posting custom campaigns on their site. River Bend has identified the following top levels of site areas or containers for content that are directly accessible from the home page:

39 of 439

Products Company Locations News Contact

From these top levels, a secondary site area allows users to specify the topic that they are looking for within that area. For example, the secondary site area for products includes coffee or tea. This architecture provides an obvious separation that users can comprehend that leads them to the information they want to find. The third level site area offers more content on the chosen topic. For example, under tea, users can find black tea, green tea, and herbal tea. From both levels 2 and 3, the site offers detailed search capabilities for specific items that the user might be looking for and tailored campaign content based on the site area and user profile information.

Hierarchical structure of the River Bend website


The following figure illustrates the complete hierarchical structure of the River Bend website.

Page layout
To determine the structure and layout of the site it is important to create basic diagrams to help users to better understand how content will be structured. Likewise, it is important to agree on a navigational model. One method of building a website is to create basic wireframe diagrams. Wireframes are like blueprints for a website page layout. They show how the framwork of a website look like. You can use drawing, graphics, or presentation tools to draw the wireframe diagrams. Wireframes connect the underlying information architecture.

40 of 439

In a wireframe, it shows where the content or navigational item lay on a page and the functions that the page provides. For example, in the following figure, it shows where the content item, content menu, and link menu will be placed on a page. It also shows where the navigations and search capability will be provided on the page.

The following figure illustrates a sample home page also known as the landing page. This page is the starting point for site visitors. The page contains the following items: 1. Offers Menu - To tempt visitors into navigating to new product offerings such as a new coffee blend. 2. Four link images - To help users to quickly access to the important information (Content item A, B, C, and D). This can be for example, Coffee, Tea, News, and Company information. 3. Footer with short links - To provide contact, policy and site map information.

41 of 439

4. 5. 6. 7. 8.

9. 10.

The following figure shows the main or general page which provides access to all parts of the site: Navigational elements expanded - To show sub areas of the site - one parent and one child node deep. Offers Menu re-used - Perhaps slightly re-arranged (by date). Main part of the page - Used as the primary content delivery area, with inline editing tools when available. A Rate button is shown which uses an API function. Search bar - To allow users to perform search in the website. Campaign area - To deliver targeted information depending upon season or date (for example, eggnog or cinnamon coffee at Christmas, iced teas and coffee in the summer). Links Menu - To show links to other content with a suggest button. Foot - Re-used footer to display contact, policy, and site map information.

Note: The wireframe diagrams listed above are for illustrative purposes only. They do not represent the actual wireframes for the River Bend site.

Results of an inadequate information architecture


We have discussed some examples of good information architecture, in this section we discuss the consequences of an inadequate information architecture. Any web content management project should highlight the consequences of poor information architecture. For example, an inadequate information architecture may show up as inconsistent website structures and a poor user experience. Websites that spread information over several areas do not follow a consequent architecture. In these cases, users lose themselves in the site, be unable to navigate back to the home page and be unable to easily find the information they seek.. An inadequate information architecture may mean the website does not consider the needs of first-time and occasional users as well as regular, experienced users. Another easily overlooked aspect is that of the overall experience of the user, considering

42 of 439

not just the content and page layout but also the potential screen resolution, browser type, mobile access from smart phones, tablets and other devices as well as language and any accessibility and disability considerations. You should ensure that all of the relevant aspects are reflected in the user scenarios you develop. We'll talk more about this later in this chapter. Whilst we have stressed the importance of considering and developing the information architecture for your site as early as possible you may find that changes need to be made later in the process. This can be due to changes in the project scope or feedback from usability testing. Ensure that due consideration is given to the existing IA, any decisions based from this and the impact of the proposed changes by someone familiar with the architecture before any fundamental changes are made. Consideration should also be given to whether the site will be delivered through a portal or traditional website as these will likely drive differences in the information architecture as a portal site will need to consider what other tools, applications and capabilities are to be delivered alongside the web content. Sometimes an organization will implement an information architecture that may appear not to meet some users requirements. For example, a car manufacturer's web site will likely use an information architecture that provides good, easily found information for users looking for information about the latest models and launches. However, if users want information about specific supplies such as winter type, the information may be less easily found. The car manufacturer has fundamental business motive behind this strategy if for example the car manufacturer wants users to contact a local dealer instead of using the web to gain this type of information. In this example, the information architecture forces users to follow the preferred distribution channel and, in turn, helps the car manufacturers business. In this case an alternative would be to make the type information easily found but for the content to refer the car owner to the dealer and provide tools to easily find and contact their nearest dealership.

2.3.2. Key considerations and decision processes


Matching consumer needs to your website. This section describes key considerations and decision process when planning information architecture.

Introduction
How easily content can be found on an intranet can directly impact an organization's overall productivity. Organizations recognize the importance of information architecture as both the primary prerequisite for designing and developing a new content management system and as the means to organize information in a way that is readily accessible to customers or employees. One example is a call center that responds to customers by using an intranet portal to maintain contracts and to give information. For this call center, the range of time that is required for an agent to find the corresponding information and to fulfill the required steps ranges from under two minutes to four and a half minutes. Thus, if 80 attempts per day are made to find information and each requires two minutes more than necessary, this call center loses 160 minutes or 2.5 hours in productivity. Even without considering the costs that result from lost productivity, the customer satisfaction will decrease. When users cannot obtain the information that they need the organization has a dissatisfied customer or, worse, a lost customer. The effort to win back these customers is significant.

43 of 439

In addition to content accessibility, design flexibility becomes a key success factor for the information architecture of a website. One task is to conduct workshops with business stakeholders, including corporate communications and process area representatives. Given that the website will evolve as more business users provide input and, more importantly, contribute content, the site architecture can be expected to evolve as well. It is critical that the site framework be developed with flexibility for modification as a key goal. When planning the information architecture, key considerations include: Understanding the goals of the site Understanding your audience Considering objectives and key success factors Finding a highly effective application Defining use case scenarios Planning the site framework and site areas Defining category taxonomy Defining content type hierarchy Defining metadata, keywords, and categories Determining the components of the website Using workflow and syndication

These considerations translate to tasks that you perform and they guide you in the website design and decision process.

Understanding the goals


When designing an information architecture, you first need to understand the business and user goals as well as the audience to whom the information is directed. Before you can look at structures, individual applications, or design aspects, you must define the business goals and the user goals. Web content management projects should be driven by defined business objectives and the primary project goal needs to accomplish those requirements. When the project starts, the business objective is often exposed to discussion as more users provide input, because content providers have a better understanding of the information that the website provides. However, this understanding can mislead content providers into believing that they also have a better understanding of the business needs. You need clear communication from the business constituency to monitor the motivation of the core team and the joint content provider. Unfortunately, web content management projects often are delayed because of misconceptions between the core team, the content providers, and the users. Before starting a website project, everyone involved should understand the defined business goals and the user goals of the project. The challenge is to involve content owners in the definition and to remain focused on the essentials. The user goals should be related to the users of your site (internal or external) and the experience that you want them to achieve when visiting the site. These two sets of objectives, that is the business goals and user goals, must be weighed against what is achievable in terms of budget, scope, and other limitations. When the organization understands both goals, there is a much higher chance that the content management project will be successful.

44 of 439

In our example of the River Bend Coffee and Tea Company (River Bend), the business goals and users goals are clearly defined after two studies were conducted and the core team completed a conceptual review. The sample findings of these tasks are outlined in the following sections.

Understanding your audience


First, you need to understand the demographics of the audience and why they visit the site. What are the business goals of the site and does this match the audience view of the business? Users do not have the same tolerance with web information that they have for printed or broadcasted information. If you cannot meet your audience's needs, you rarely get a second chance, especially when facing an external audience. In many cases, even employees will reject an information source that is ineffective. As stated in the beginning of this section, the only reason to share information through a website is to make it available to users. The usability of a website is an essential aspect, good usability ensures the audience can use the site to meet their goals. Usability can is achieved by meeting the needs and expectations of the target audience. As a recommended best practice, it is important to involve users during the process of designing the information architecture. By doing so you help to confirm the usability of the website and, in turn, to confirm an effective underlying information architecture. In many projects only content owners with a deep knowledge of the content are involved in the design process. While content owners know the content very well, it is important to involve the target audience to validate that the navigation structure is intuitive. A good approach to understanding the target audience is to gather information about them. The more information that you can gather, the closer you can get to finding gaps in the understanding. At times, you might need to classify the audience into groups with individual needs in order to better understand the needs. You might also need to consider cultural, geographic, age, or technical differences. Some audiences need individualism to have a positive website experience. What a specific user might consider appropriate and inviting can be different from other users. Often experiences from other web sites can influence the users of your website. A good web content management product offers the flexibility to set user expectations. By using traffic analysis, you can better understand the interests and proceedings of users. A website that is built based on an organization's good understanding of the audience offers content that interests the user in a way that is intuitive and convenient. In the case of River Bend the company conducted a workshop that captured the needs of the user community through a survey of their user customer base. Several key items came out of this survey: Information was all generic and not well organized. The existing site was hard to navigate. Specific information on the site was hard to search.

Another common mistake that occurs in projects such as these is that either the questions or the answers are left to be too vague. Obviously, this leads to assumptions being made that may or may not be correct. For example, in the previous example, the

45 of 439

results of "the existing site was too hard to navigate" is ambiguous. It leads to other questions, such as what specifically was "hard" about the navigation? Consider for example the following additional questions: Were the menus too long? Was there too much scrolling? Was the resolution too poor to read?

Upon doing a follow-up survey, the previous points were then further defined so that they were useful: Organization When navigating the site, it is easy to loose where you are The grouping of content (teas versus coffees) was not clear "I didn't feel that the site was specific to my needs" Other sites offer recommendations and recipe ideas Navigation The menus were sometimes 4 or 5 levels deep, too hard to keep track of Some content was too lengthy, a lot of scrolling needed Search There was no intuitive way to search for specific coffees

Considering objectives and key success factors


For your web content management project to be a success, consider and define the key success factors that will determine whether the website is meeting the objectives. Additionally you also must understand how to measure your key success factors. Keep in mind that higher website traffic is not necessarily an indication of a good website. For example, repeat visits can only be counted as a success indicator if the visits lead to a positive user experience or, in the case of a commercial website, to increased business. Numerous mechanisms are available to measure the success of a website including simple feedback forms, analysis of complex statistics, and custom-defined measuring criteria. Objectives and key success indicators might include the following examples: Avoid underestimating the role of the information architecture. Make a distinction between the business goals and the user goals. Understand the business goals and the user goals. Organize information in categories and levels. Ensure that the information architecture provides the following features: Intuitive navigation Consistent structure User friendly navigation, for both the first-time visitor and the frequent user, in a structure that serves the wide scope of all the content Provide flexibility in the design as the information architecture evolves.

46 of 439

The site framework should also be flexible and easy to modify: Ensure clear communication to those involved with the project. Involve content owners in the defining process but remain focused on the essentials. Get feedback from different groups of users from everyday content creators through site managers to occasional end users. Ensure varied groups and users review the content and site, avoid having a single user or department review as their perspective may be skewed. Appoint an overall lead for the project to ensure decisions get made and the project moves forward. Ensure that the content is easy to find. Ensure good knowledge of the audience's website experience. Make a distinction between different types of users. Set a realistic time frame.

In our example of the River Bend, a workshop was conducted with the key business stakeholders. They defined business objectives based on the feedback from their customer user community and the current state of the business. The following key items, among others, resulted from that workshop: Increase customer satisfaction with the site. Based on individual user profile, provide recommendations of other items they might be interested in purchasing. Present targeted sales and promotional campaigns on the website in order to drive more revenue.

Finding the 'key' application


One way to drive use of the website is to identify at least one key application or feature that users want or need to use frequently and make it available only on the website. Most often an application or a particular type of information can be easily identified. Then, you can make this application easily accessible within the information architecture. In our example of the River Bend, after the survey of the customer end user community was completed and the output from the line of business stakeholders was reviewed, the core project team conducted a review session to agree on the overall project plan. First they decided on the 'key' application. In our example, there were two. The first application was defined as being the recommendation component. It constantly makes new recommendations of teas and coffees that the user has not yet tried but has a high probability of liking based on their buying and viewing trends. The second application was the campaign portion of the site where targeted promotions were presented based on user profile information. After you determine the business goals and define the audience for your website, start thinking about how visitors will use your site and how the design can ensure high usability. User Centered Design (UCD) ensures that the objectives of users are taken into account when designing the site. A characteristic of a UCD approach places the user at the center of all design decisions when building a website. UCD also includes design in the manner of structure and information architecture. One common complaint from users may be that they cannot find what they need on the intranet. This does not mean necessarily that the site is designed poorly, but that the

47 of 439

spectrum of users is comprised of linear and non-linear thinkers. A linear approach, a non-linear approach, and a combination of these two approaches are equally valid. To accommodate the broadest community of users, IBM recommends that you develop three discrete design directions, focusing on page layout and navigation. Then present the design directions to a focus group that is comprised of a cross-section of users. The users will provide feedback regarding specific direction about how you should design the site and the content that you should highlight. A facilitator, which can be a qualified person within the content owners, should be engaged to conduct the session, and the session should be scripted with specific questions to ask the group. A website with a high score in terms of usability includes the following characteristics: Information is easy to find. The site is simple to use. Pages open quickly. Creating and maintaining content is a painless process. The site is adaptable to changes. The site must be secure (where applicable), stable, and scalable for both the content and the user population.

As discussed in the section above, Understanding your audience, you might need to classify the audience into groups with individual needs. You can divide these groups of users at least into two subgroups: First-time users Experienced, repeat users

In addition, include a second involved target group when it comes to UCD. Consider the following experts who will work with the web content management system: Content authors (such as content creators and approvers) Site developers and site administrators

The success of a web content management project also depends on the usability for the every day editor's work. Their environment should be intuitive and consistently structured as well.

Defining use case scenarios


We have discussed the process of defining the audience's expectations at a website. The next step is to define how users access the information. A first approach is to define a number of key use case scenarios that represent the way that you expect users to interact with the website. Define these use case scenarios from a user prospective in order to deliver an authentic scenario. They must include information about the involved context. The amount of detail that each user needs depends on the specific objectives of the website and the additional requirements that you identify during the project. The goal is to identify and build a picture of common tasks that users want to complete and how you anticipate the user completing these tasks. This iterative process starts with research about the audience, continues into the high-level design of the site, and is followed by a more detailed level of design that includes the structure.

48 of 439

In our example of the River Bend, there were five use case scenarios: 1. Persona: Content Author Description: An internal River Bend non-technical employee who needs to quickly and securely search relevant content libraries to his specific group role and create and submit for approval content based on a predefined UI template. 2. Persona: Content Approver Description: An internal River Bend non-technical employee who needs to quickly and securely get immediate notifications when new content is waiting for approval and be able to view, modify, delete, or approve content for immediate publishing to the website. 3. Persona: Customer User: Guest Description: An anonymous Internet user who initially spends a short time on the site but who needs to quickly gain an understanding of the company vision and what makes River Bend unique to its customers. 4. Persona: Customer User: Coffee: Big Bean Level Description: A self registered River Bend Internet customer who is a frequent visitor and buyer of River Bend coffees and teas. This user expects to be made aware of new and ongoing promotions, expects to get recommendations of other products, services, and recipes, expects to quickly search for whatever the user needs to find on the site, and expects to navigate to a destination in the site within two to three clicks. This user has a level of Big Bean, which implies that this user gets an automatic 15% discount based on buying patterns. 5. Persona: Customer User: Tea: Tea Leaf Level Description: A self registered River Bend Internet customer who is a frequent visitor and buyer of River Bend coffees and teas. This user wants to be made aware of new and ongoing promotions, expects to get recommendations of other products, services and recipes, expects to quickly search for whatever they need to find on the site, and expects to navigate to a specific destination in the site within two to three clicks. This users has a level of Tea Leaf, which implies that this user gets an automatic 5% discount based on buying pattern.

Planning the site framework and site areas


As described earlier in this wiki, the site framework is the site map of a website. Site navigation (through navigator components) can be generated from the site framework. As an example of how to plan the site framework and site areas, we use the sample case of the virtual River Bend website. The information architecture analysis consists of two parts: A top-down approach investigates the content to be displayed on the site, plus the needs of the audience that is accessing the site. This approach helps to formulate the scope of the site and supports our understanding of how the overall site will be structured. A bottom-up assessment is performed, which starts from the most basic level of the website, the content page. This process determines which metadata, including categories and keywords, to use to profile documents.

The goal of this analysis is to determine the structure of the site and, consequently, the

49 of 439

navigation of the site. During this process, the following core facets of the information architecture are developed: Site framework Category hierarchy Authoring template type hierarchy

Site framework
There are two ways to organize the content on a website, hierarchical and cross linking. Hierarchical organization Hierarchical organization of content is represented in the following figure. Each piece of content has a physical location at a level in the site. Because content is usually accessed from a single entry point (for example, the home page), hierarchical organization of content is particularly well suited to websites. Hierarchically structured content works best if you have well organized content that can be easily sorted into different levels on your site. Most visitors to a website understand the concept of hierarchies, such as chapters in a book. Therefore, this is a common navigational aid. It provides at a glance an idea of the site's structure. This type of content organization may be better suited to a less technical audience. The following figure illustrates the hierarchical organization of content.

Cross-linking Cross-linking content is illustrated in the following figure. With cross linking, any page can be linked to any other page on the site, regardless of its location within a hierarchy. This type of content organization works well in web sites that enclose many hierarchal levels and allows content that is located on a deeper level within the website to be presented at a higher level. Cross-linked content is well suited to a more experienced user and is intuitive to use only if the linking follows a content context that the audience easily understands. Frequently,

50 of 439

only the Back button of the browser allows the user to revisit pages. The following figure illustrates cross-linking of content.

In traditional, flat HTML websites, the site framework is an artificial concept based on links between pages. In IBM Web Content Manager, the site framework is defined first, and the links between the pages are generated dynamically. The different sections of a website are defined in site areas, and content is grouped under different site areas. Navigators are based on the site framework. By clicking a navigator, a user can access all content in a specific area. Menus display lists of content that can be located in any area of the site. Menus usually show content grouped by category, although menus can use a variety of search criteria, including site framework and content type.

Defining category taxonomy


The next stage is to create a hierarchical classification system that is used when displaying content. Category taxonomy is simply the classification of content into categories. Once created the taxonomy is used to apply a set of standard categories to content. The taxonomy defines the category attributes that can be assigned to content located anywhere in the site. By referencing different pages of content assigned the same category, content from different locations can be grouped together for display and access. A category usually refers to the general subject matter of the content or its attributes, for example news or even the product type black tea . When creating a taxonomy of categories, the main goal is to make it easy for content to be appropriately categorized so website users and search engines can find specific content. An added benefit is that an organization can begin to apply standard practices around the classification of content inside the organization.

51 of 439

The number of levels to create


If you find that you have so many documents covering various topics that when searching for a document based on a category, an exhaustive list is returned, it is time to think about creating new categories. You might want to assign a category to do the following tasks: Make it easier and more effective to find the information for which you are looking. Enable more effective searching on content (either within the site or by search engines).

Two main standards groups are doing work in the area of categorization: The Dublin Core Metadata Initiative includes specifications of the terms to be used when creating metadata. You can find information at: http://dublincore.org. The World Wide web Consortium's Resource Description Framework (RDF) provides recommendations about the way to represent resources on the web. You can find information at: http://www.w3.org.

The initiatives of these two organizations provide companies with the ability to standardize the metadata tags that they used on their site. These initiatives provide standards for terminology to be used in category taxonomy. However, they provide little assistance in the creation of the taxonomy itself.

Creating a category taxonomy


Categories are grouped within a taxonomy. Categories are organized into parent and child entries within a taxonomy. When building a hierarchy of taxonomies and categories, it is important to consider how a menu will use your categories in a search, because menus search both upwards and downwards within groups of categories, as follows: If you base a menu on a top-level category, all content profiled with categories belonging to that top-level category and their children appears in the menu. If you base a menu on a parent-level category, all content profiled with the parent level category, its children, or its parents appear in the menu. If you base a menu on a child-level category, all content profiled with the child category or its parents is returned by the menu.

We recommend that, in most cases, you use only child-level categories to profile content to allow more control over what displays in menus. Taxonomies cannot be used in Web Content Manager menu searches. If you want a menu to return results based on content that is profiled with any category in taxonomy, create a single, top-level category and base the menu on the top-level category. For our fictitious website for the River Bend Coffee and Tea Company, we organized the content by the five sections Products, Company, Locations, News and Contact, as shown in the following figure. Our reference implementation site structure reflects this organization.

52 of 439

The secondary site areas allow the user to specify an item to search on in this area. The secondary area for Products includes coffee or tea . The separation is obvious, and users can comprehend intuitively and exactly what they can expect to find here.

Defining content type hierarchy


With IBM Web Content Manager, content is created using authoring templates. These templates are forms that structure content and can be grouped into different content types. When it comes to defining the required document types, it is common to hear content owners requesting a content type for every purpose. For example, the sales team wants a content type for products, human resources want a content types for career information, and marketing sees a need for a content type for news and company information. From a technical perspective, these requirements can be achieved using fewer authoring templates because they are essentially quite similar. Instead of creating a new template for every content type on the website, templates can differ by page design, such as page layout, page style, and components. Then, you can apply these templates to the many content types that you create so that the content purpose is separated from its layout, making content and presentation flexible. Proper construction of the site ensures maximum reuse, flexibility, and performance. Formulating ideas about other components to be used in the website, such as graphics, menus, navigators, and so on, is also helpful. You can find details on designing the website and implementing it in the "Building the sample site" section.

Defining metadata, keywords, and categories


When content is created, it is crucial that you provide descriptive information for that content so that it can be categorized and searched. Descriptive information is called metadata, as defined by the W3C (http://www.w3.org/Metadata/) . Metadata is machine understandable information for the web. Metadata includes labelling, cataloging, and

53 of 439

descriptive information that is structured in such a way that allows web pages to be properly searched and processed. Metadata is often keywords about the content of digital material in the form of labels that are only visible in the HTML code that builds the web page. The metadata will often come from the keywords or categories that a user associates with the content. In our example, we plan to generate metadata for WCM pages by specifying standard metadata fields. The search supports the metadata fields that are described in the following table. Name Description Author Keywords Subject The title of the content item A description of the content item the authors of the content item Keywords that are associated with the content item Taxonomy and category information associated with the content item

The metadata is created automatically for each web page. Refer to the search methods detailed in the "Search" section of this wiki.

Determining the components of the web site


Again we use our example site, the River Bend, to explain the components used. The following figure shows an overview of the site, with key components annotated.

54 of 439

The River Bend website is built using five components: 1. The company logo is used as the head banner. 2. At River Bend, search can be executed from two areas. The first is a basic text search of user-specific content from the banner area. The second, more detailed search performs an advanced search of content text as well as metadata tags. 3. The personalized greeting is displayed to the customer and, in this example, also indicates their status level. 4. Based on the page design, this is where the dynamically changing campaign and recommendations are displayed. In our example, in the interest of conserving real estate on the page, the team decided to write some Java script that refreshes the area every three seconds with a combination of campaign and recommendation centric content. 5. The content area displays the current, selected content. The chosen navigation shows all top levels of the River Bend site which makes it easy for users to navigate the site. The navigator expands downward and can be used to support further site areas.

Using workflow and syndication


One of the advantages of using a IBM Web Content Manager is to dispense the content creation process over different locations or within different security levels. With multiple locations (servers) in a typical IBM Web Content Manager environment, it is necessary to have a mechanism that can synchronize content between the multiple locations. In addition, a typical requirement has the content pass through a formal approval process before it can be viewed on the website. IBM Web Content Manager provides two complementary capabilities for these issues: workflow and syndication.

Creating a workflow
Workflows can be used within IBM Web Content Manager to review, approve and authorize content published to the website. Normally at least two stages, Draft and Published are needed for a workflow. A recommended workflow contains the stages Draft, Approval, Published, and Archived. As the content passes through each stage the change is logged in the content history which makes traceability easier. IBM Web Content Manager offers various options to configure more dedicated workflows to serve further needs including custom workflow actions which allow integration with external workflow or process systems. Often the dynamics of a site require other workflow options such as a quick publish, no approval workflow. This workflow, available only to certain authorized users, allows content to be quickly pushed through to the publish stage without having to go through a multi-step approval process. This can be useful for quickly making changes to existing content or publishing time critical new content. Important: The process of content creation is often underestimated. The technology is simple, but the planning is where the real work begins. There is a significant risk in underestimating the value of the workflow process. Workflow ensures content quality and that published content meets the organizations policies and requirements.

55 of 439

Using syndication
Syndication is the method used by an IBM Web Content Manager location to exchange (replicate) data from one IBM Web Content Manager library to another. Syndication is not involved in the process of approving content. Syndication is only responsible for replication of IBM Web Content Manager assets across multiple locations. When creating a syndication process, IBM Web Content Manager allows you two choices for the granularity of items to be syndicated: All Items When configured with this setting, all elements of the IBM Web Content Manager location are replicated to the other location, including draft and expired content. Typically, authoring and development locations need access to all types of content for testing purposes. This setting is common when syndicating between distributed authoring locations or between an authoring location and a development location. All Live Items As opposed to the All Items setting, this option replicates only live content. Live content is defined as content that has been approved via workflow (live) but that is not yet past its expiration date. Typically, a production location only receives live data, so this setting is common when syndicating from authoring to staging or staging to production.

Tip: Syndication always syndicates copies of your technical assets (for example, presentation templates, authoring templates, library components, and so forth). By default, there is no setting to stop this syndication. You can configure IBM Web Content Manager to workflow these items.

2.3.3. Designing information architecture


This section describes designing information architecture using presentation templates, site navigators, direct and embedded links, menus, and searches.

Introduction
A critical component of information architecture is its design, which addresses content access through the site interface. Page layout, links, menus, navigators, taxonomy, site breadcrumbs, search, identity standards and graphics are all components of web information design. Users have different preferred means for accessing information so an effective information design provides users with multiple ways of accessing information. The most common means of accessing information are: Site navigators Direct feature links Embedded hyperlinks Site menus Search

All are valid and we recommend that you leverage all the site components from IBM Web Content Manager (WCM) when designing and building a site to enhance user

56 of 439

experience. To provide a relevant context for these components and to illustrate specific examples, we use the River Bend sample site referred to throughout this wiki.. We use these throughout this book, because we believe that they represent good information architecture and good site design.

Using presentation templates


One of the features of IBM Web Content Manager is the separation of content and its creation from the presentation of content using presentation templates. With presentation templates, the content creator is not responsible for the page design that will ultimately display their content document. The presentation template is determined by a loosely coupled relationship between a page design and a content authoring template. It is recommended that you avoid a large number of slightly different presentation templates and instead, use one that covers all authoring template features. It is possible to pair different page designs (presentation templates) with one authoring template in different site areas. This means one piece of content can be displayed in multiple ways depending on the site area currently displayed -- called multipublishing. Different uses of multipublishing can be helpful. You should create one content that includes a full set of information, for example, product information. This content can contain confidential material that is published in an intranet or extranet. If the same content is taken and published in the Internet, different presentation templates allow you not only to have a different design but also to share a subset of the original content securely. You can create content with the same type of authoring template but publish it with different presentation templates, depending on the department, brand, location, or language. To increase the reuse and decrease the maintenance effort, components are used. Presentation templates can contain different kinds of components that are used depending on the site area where content is published. Thus, when news is separated into categories, depending on the site area, a different title logo (component) is chosen instead of creating a presentation template for every news category.

Using site navigators


Navigators a key part of user's web experience. Some users prefer to drill down through navigation levels with the site structure being as big a part of the user experience as the content itself. When it becomes necessary to include a high number of navigation levels, it is crucial to choose an information design that stays straightforward and intuitive. A very powerful feature is highlighting the selected navigation path. Users can easily get confused when the navigation does not follow a logical structure or changes its design. Related to the usability considerations, you should also consider the performance of navigation. To save space or because it might seem more high tech, navigators are used that encompass all available navigation levels by clicking or mouse over. This kind of navigation often requires complex handling and cannot be easily overlooked when web accessibility is a big issue. Consideration should be given to the accessibility of websites for all users, particularly public sites. Because IBM Web Content Manager is used to manage dynamic sites over many years, navigation should allow the site to expand dynamically.

57 of 439

Note: Navigators are not menus. Menus are a list of hyperlinks that take you to specific pages, but navigators are organized differently. Navigators present the logical arrangement of a web site, while menus are a list of related web pages that might appear
anywhere in your site and use search criteria to present the links.

Using menus
A menu is ultimately a search mechanism that groups together lists and related documents based on specific criteria, such as categories, site areas, or keywords for display and access to users. The image below displays links as images, icons with text, links with a summary, or many other combinations. These menus combine elements based on content from more than one site area, not possible with navigators. To users, menus and navigators provide the same functionality allowing a user to navigate around the site or to locate particular content.

Using direct feature links


Of all the methods to access content, direct feature links is the most direct way of accessing content items. This method enables one-click access from a top-level site location, which is almost always the home page, to any content that may be embedded a few layers down in the site structure. These types of links are reserved for the most timely and relevant news or information. However, they can also be used to provide additional information that is related to the current content. Through the use of menus, and leveraging categories, parameters can be set to bring the timeliest content to the home page. In addition, individual pieces of content can be categorized, or a category can be associated with a specific content template so that all content created with that template has the specified category. Content can have one or more categories. These categories then can be presented dynamically by direct feature links such as News, Products, Events, or Promotions. These direct feature links are embedded as rich text components and are central managed enabling any site developer to re-use the same links wherever they are applicable. We recommend that every site include the "Search", "Contact", and "About us" direct feature links to provide the user with a good web experience.

Using embedded hyperlinks


Embedded text hyperlinks provide users with one-click access to content that is related to the article that they are reading but may be in a different area of the web site. The only way for users to return from embedded hyperlinks is to use the browser Back button. Navigators and breadcrumbs do not work here. When pages include links to pages outside of the web site, the current web site will often be replaced when clicking the new link Alternatively the new site may open in a separate window. Often, embedded hyperlinks are used to define a word or phrase that is mentioned (much like a cross reference in a book).

58 of 439

The figure below shows the embedded hyperlinks marked by red square boxes.

Another usage of embedded hyperlinks is in WebSphere Portal where they can be used to reference corresponding content or applications, depending or related information. This WebSphere Portal feature is called Click-to-action. The click-to-action capability lets you send information from one portlet to another automatically. This capability leverages the way that web content and web applications interact and leads to more powerful dynamic workplaces. For example, if a user clicks on a specific topic in a Topic List portlet, click-to-action allows an adjacent portlet to limit the postings shown to just those in the specified topic, based on the criteria selected in the Topics portlet.

Using search
Searching a website is one of the most used features and is particularly useful to users who do not have time to learn the site structure. Visitors expect the search to return exactly what they are looking for, particularly when they know that the information is there. Because of this high expectation, search results need to be high quality. To return effective search results it is critical that content categories and keywords are defined and applied to each page prior to publication. See for information related to the search setup and configuration. So, how should a search work from an information design perspective? There are two options possible. First, the search function should be ntuitive to use. The user can enter words in an input field, and the results deliver all content that include the searched parameters, sorted by relevance. Relevance normally means it starts with the content that includes all words searched for and continues with single words found. The second option is advanced search. Advanced search options may included Boolean combinations using AND, OR and NOT as well searching by Date, Author, Keywords or other metadata. Search results can also have a different approach. Search results will usually offer a URL to the web page that includes the cited content. Search results may also include a short abstract of the content as part of the result. This abstract offers a specified number of words from the content or additional metadata fields. Details of the results can be saved for download or can be printed.

59 of 439

For a multilingual site, consideration should be given to the default language of the search as well as parameters controlling which language content is to be returned.

2.3.4. Introduction to personalization


This section introduces personalization which enables automatic content delivery that is customized for each user. WebSphere Portal implements rule based content delivery through a feature known as personalization. By using personalization, websites can customize content automatically for each user. Personalization can recognize a specific user based on a profile. It can also determine characteristics of a user based on previous purchases, products, or pages viewed and then select content that is appropriate for that profile. In the case of the River Bend Coffee and Tea Company (River Bend) site, a simple personalization rule is implemented to better illustrate the concept. The personalization rule implemented is based on dates. If the dates for accessing the site are within a range of defined "Summer dates", then the home page illustrates a summer-based image of a refreshing iced coffee drink, as shown in the following figure. If the dates for accessing the site are within a range of defined "Winter dates", then the home page illustrates a winter-based image of a hot coffee drink.

60 of 439

2.3.5. Site acceptance and information architecture workshop


This section provides recommendation for site acceptance and also recommendations for preparing and conducting information architecture workshop.

Recommendations for site acceptance


A IBM Web Content Manager (WCM) project can only be successful if the persons involved in the project are motivated to give their part. Often, these kinds of projects involve for the first time a wide range of job roles within an organization. Unlike many other IT or knowledge projects, a web site whether internal or external likely involves all parts of the organization. Organizations can underestimate the political, local, and cultural problems associated with a project of this type, and this can become the biggest challenge of the project. Therefore, it is crucial to communicate the reasons and business value of the project and to get a wide acceptance of the project for it to be successful. One challenge constantly voiced by technical teams is the lack of site use by many of organization's staff and the lack of content contribution by the business stakeholders. We recommend a few basic actions to help build support for the web site. These recommendations are as follows.

Identifying and getting business stakeholders involved


Identify a set of business stakeholders, including the target group (not necessarily the designated intranet liaisons) to not only contribute to information architecture sessions but to provide feedback on general layout, design direction, and so forth. Ask these stakeholders to communicate within their groups, identify potential power users, and commit contributions of new content to the site. Consider leveraging the power users as beta testers of the site, both as users and content authors.

Developing discrete design directions focusing on page layout and navigation


To accommodate the broadest community of users, we recommend developing discrete design directions, focusing on page layout and navigation. Those design directions should then be presented to a focus group comprised of a cross-section of customer users. Feedback from those users provides specific direction into how the site should be designed and what content should be highlighted. A facilitator should be engaged to conduct the session (it could be a qualified person within the organization), and the session must be scripted with specific questions asked of the group.

Developing communication and enablement plan


As with any deployment of a new system, the organization should develop a communications plan to introduce the new web site. If power users are identified within the process areas, they can help provide a level of enablement and support within their groups when the new site is launched.

61 of 439

Demonstration Part of the communication plan should include a demonstration that illustrates the site navigation. In that demonstration, very simple action settings should be enabled for demonstrating the multiple ways of providing information. Not all information access methods need to be demonstrated. Open and agreed areas should be identified and marked. In meetings with business users, demonstrations such as this require little preparation time but are effective in communicating accessibility and usability concepts.

Recommendations for preparing and conducting workshop


Organizations planning an IBM Web Content Manager project should conduct information architecture workshops with business representatives of each of the process areas over the first period. This section outlines some recommendations for preparing and conducting workshops.

Workshop preparation
Information architecture workshops require preparation in order to be effective. Prior to conducting any workshops, we recommend that organizations develop a test site with IBM Web Content Manager to gain hands-on experience with the product and to develop an understanding of the capabilities of the tool. This training helps the team to connect user requirements or wishes with the capability of the tool to support them. With that understanding, stakeholder requests that are technically complex or time consuming can be identified immediately, so that expectations can be set correctly. Alternatives can be discussed on the spot. After a workshop is scheduled with the stakeholders of a process area, the organizations team should thoroughly review that area of the site. Site areas and a sampling of specific pieces of content should be identified and documented. Separate documented notes by content type or site area but make no additional marking on them prior to the workshop. To reach a high acceptance, we recommend a professional preparation. Because the workshop topics can get quite challenging, you do not want to spend any time discussing topics that are related to future topics. We recommend setting up the conference room for the workshop prior to its start (for example, draw a couple of page layout grids on a whiteboard and include some of the page elements that are persistent throughout the site. In addition to the information provided here, see the following article for specific recommendations and an approach to assist a consultant in defining a WCM workshop agenda:
Guide to running a WCM Requirements Workshop

Conducting the workshop


Unlike a workshop with the technical team, workshops with business stakeholders should avoid technical terminology or a discussion about how the IBM Web Content Manager tool functions. A suggested approach includes: Introduce the goals and objectives of the workshop, and the overall IBM Web Content Manager project. Identify basic terms (grid, banner, header, navigator, and menu) used to produce a work product for this process area.

62 of 439

Have the business stakeholders validate the site areas and content identified in the preparation. Group like content types together, and arrange the groupings on the whiteboard within the grid. Use a system of dots to identify site levels (one dot for the top, two for the next, and so forth). Capture the raw output of the workshop on digital camera.

Work products
The workshop outputs should include: A map of the process site area hierarchy, usually developed in Visio. Page layouts, usually drilling down two to three levels.

2.4. Design and layout


This section discusses design and layout of a website to be build using WCM. Specifically, it addresses content usability and accessibility as it pertains to a site interface.

2.4.1. Approach to designing and laying out website


When designing a website, it is critical to organize information so it can be easily found by users. The structure in which information is organized is called the information architecture. Information is structured within a site framework in WCM which is exposed through the website navigation. When planning the information architecture an organization must determine the following information: The hierarchical structure of the site The functionality that is required on the site The look of individual pages How to classify the content The flexibility of the architecture to allow the business to evolve

Information architecture determines the structure of the site, how navigation is derived, and the ease of navigating the site. The following Content Management System constructs are developed when designing a system: Site framework Category hierarchy Content type hierarchy

Defining the information architecture lays much of the groundwork for how content is organized on a site. Regardless of where the content resides, you need a good understanding of the content. For detailed information on how to determine a proper underlying information

63 of 439

architecture, and to begin modelling the initial structure and design of your site, refer to the following sections in this wiki:
2.3.1 Defining information architecture 2.3.3 Designing information architecture 2.3.5 Site acceptance and information architecture workshop

2.4.2. Website usability


A critical component of information architecture is its design, which addresses content usability and accessibility as it pertains to the site interface. Page layout, links, menus, navigators, taxonomy, site breadcrumbs, search, identity standards, graphics, and site metaphor are all components of Web information design. Different users have different preferred means for accessing information. Thus, an effective information design provides users with multiple means for accessing information. The most common means of accessing information are through the following ways: Site navigators Direct feature links Embedded hyperlinks Site menus Search

These are all valid ways of accessing information. We recommend that you leverage a variety of site components from WCM when designing and building a site to enhance user experience. To provide a relevant context for these components and to illustrate specific examples, we draw upon examples from River Bend sample site referred to throughout this wiki, and other relevant sites. We use these throughout this book because we believe that they represent good information architecture and good site design. Tips to make the website usable: Make a clear and intuitive navigation model for the site. Make it obvious so that users know - Where they are now - Where they have been - Where they can go Keep the navigation model consistent throughout all pages and components of the site Use direct embedded text hyperlinks effectively and include sub-text (mouse over text) to make it obvious where the link will take the user.

2.4.3. Website accessibility


The web has become an increasingly important resource in many aspects of life: education, employment, government, commerce, health care, recreation, and more. It is essential that the web be accessible to provide equal access and equal opportunity to people with disabilities. An accessible website helps people with disabilities to participate more actively in a society.

64 of 439

Defining accessibilty
As a starting point, what exactly do we mean by the term "accessibility"? The definition from the Web Accessibility Initiative (WAI) is as follows: "Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web. Web accessibility also benefits others, including older people with changing abilities due to aging."

2.4.4. Why accessibility is important for everyone


Websites are primarily about communicating information with the widest possible audience, whether a news site like the BBC , a commerce site like Amazon technology organization like IBM . It is about information dissemination and communication. Making a site accessible is about removing the barriers that might limit the groups of people that can receive the information provided; removing these barriers is what make a web site accessible. It's important to realize that the Internet and website are growing and involving more and more areas of our society. When you think about accessibility, it's easy to think about how your website is presented to those with disabilities, people who are partially sighted or blind and those who require assisting hardware to access IT. However, easily overlooked are those perhaps new to IT, mature users of the Internet or someone who's a non-native language speaker. It's important when considering the accessible web to think broadly and encompass the widest possible audience. WCM provides the platform and components to build your accessible website. Using your existing skills and tooling the IBM WCM platform provides you with a foundation and management system to facilitate accessible web design and development. or an

Standards
Making websites accessible and meeting accessibility requirements often requires adhering to standards such as the WAI (Web Accessibility Initiative) and it's guideline document, and Section 508 . In addition specific local country regulations need to be understood and applied appropriately. WAI The Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C) is focused on addressing the requirements for web accessibility. WAI provides a repository of the latest web accessibility guidelines and tools. The WCAG guidelines are primarily intended for 4 main focus groups: Content developers (content contributors, presentation designers and developers.) Web authoring tool developers Web accessibility evaluation tool developers Others who want or need a technical standard for Web accessibility

65 of 439

The WCAG documentation provides guidelines as to how to make web content accessible to people with disabilities, that's the text, images, forms, sounds, etc.. that are part of any web page or web application. WCAG is part of a series of accessibility guidelines, including the Authoring Tool Accessibility Guidelines (ATAG) and the User Agent Accessibility Guidelines (UAAG). Note: WCAG 1.0, was completed in 1999, is it's scope is HTML & CSS. In December 2008 the WCAG 2.0 guidelines were published as a W3C recommendation. Unlike WCAG 1.0, which was limited to HTML & CSS, WCAG 2.0 will be principle based in order to be applicable to all Web technologies. Here is a mapping of the two guidelines. Section 508 Section 508 of the US Rehabilitation Act Amendments of 1998 requires all US federal agencies to make their information technology accessible to their employees and customers with disabilities. Important to web content management is that Section 508 also applies to Web sites that are produced for government agencies.

Testing tools
Both the WAI and Section 508 websites make reference to several tools to assist the content contributor or web designer with their efforts to ensure that standards and guidelines are implemented successfully. In addition to tools provides by the standards bodies noted previously, IBM has also developed its own tools to assist with the testing of accessible websites and social information. aDesigner aDesigner is a disability simulator that helps web designers ensure that their content and applications are accessible and usable by the visually impaired. For more information on aDesigner, see the link to aDesigner . Voice browsers and screen readers read aloud the text on web pages and are used by visually impaired people. However, these devices are less effective with certain kinds of content, such as highly graphical material. Web developers can use aDesigner to test the accessibility and usability of Web pages for low-vision and blind people.

66 of 439

aDesigner also helps users to check accessibility of ODF documents and Flash content. It also has accessibility information (MSAA/IA2) inspection functions. Rational Policy Tester - Accessibility Edition The Accessibility Edition helps ensure website user accessibility by monitoring for over 170 accessibility checks. It helps determine the site's level of compliance with government standards and displays results in user-friendly dashboards and report.

2.5. Environment type


With IBM Web Content Manager (WCM), a variety of environment types are supported to facilitate the building, staging, and finally delivering of websites. This section describes the various environment types, their usage, and how to move content between them using workflow and syndication.

2.5.1. Environment types


In a typical IBM Web Content Manager installation, there are multiple physical IBM Web Content Manager servers. Each server or cluster in your web content system requires a separate data repository, but they usually share the same Lightweight Directory Access Protocol (LDAP). A web content system can be deployed in isolation or in parallel with a WebSphere Portal production server.

67 of 439

Typically, these servers perform one of the following roles within the WCM infrastructure: Authoring Staging or preview server Production (live) or delivery

Authoring environment
The authoring environment is where you develop and unit test the WCM technical assets such as presentation templates, HTML components, menus, and navigators. In addition, this server can be the first place you install patches and fix packs to ensure that they do not negatively impact your servers. Typically, you syndicate changes to the staging environment to roll out changes. These changes are, in turn, syndicated or replicated to the production or live environments after appropriate testing. Note: WCM currently does not support selective replication. That is, you cannot have WCM to syndicate only design changes from the authoring server to other servers in your environment. Be careful when syndicating content to or from an authoring server. One approach is to set the syndicator to syndicate only live content and delete all content (via the API) prior to syndication. Another similar approach is to configure syndication the same way but have no live content in the authoring server. Regardless of your preferred approach, be careful when syndicating from the authoring server to other servers. Content authors and approvers create, edit, preview, approve, and expire content in the Authoring environment which can be distributed if required. For example, if you have offices across the globe, it might make sense to have authors work on a server closer to their physical location as opposed to a centralized authoring system. If you choose to have a distributed authoring environment it is important to ensure that people on separate servers do not attempt to work on the same content simultaneously. In situations where distributed authoring environments make sense, secure your IBM Web Content Manager environment so that people on each authoring server can only modify a unique set of data.

Staging environment
The staging environment is sometime perceived as merely "nice to have", but a staging environment is highly recommended as a safety net. A staging environment provides a chance to review changes in the context of your whole site before they are syndicated into the live environment. This can include previewing the web content and integrating it with other applications. A staging environment is particularly useful if you are pushing out a large number changes simultaneously. A staging environment can also tie into your test environment, depending on the relevant testing that is part of your content management and WebSphere Portal Development life cycles. From a best practices perspective, the staging environment should use all functional elements found in the production (live) environment. For example, if your production environment contains a cluster for IBM Web Content Manager servers, your staging environment should too.

68 of 439

Designing your staging environment in this manner provides two potential benefits: Testing If you need to test a new configuration, install a patch/fix, and so forth, you need a place to test such changes prior to implementation on the production servers. If the Staging environment mirrors your Production environment you can confirm such changes in Staging. Performance testing In an ideal environment, Staging would be an exact duplicate of the Production environment. If this were the case you could easily do performance testing in the Staging environment. If the Staging environment contains all elements of Production but on a smaller scale you can still use this environment to run performance testing, but you will have to extrapolate the results, which could lead to incorrect performance expectations.

Testing environment
If you need to test a new configuration, install a patch or fix or make other changes you need a place to test such changes prior to implementation on the production servers. If the staging environment mirrors your production environment you can confirm such changes in staging. Otherwise or if resources are available, considering to have a designated testing environment.

Performance testing environment


In an ideal environment, staging is an exact duplicate of the production environment. If this is the case you can easily do performance testing in the staging environment. If the staging environment contains all elements of production but on a smaller scale, you can still use this environment to run performance testing. However, you have to extrapolate the results, which may lead to incorrect performance expectations.

Production (live) environment


The production (live) environment delivers the published site to visitors and is tuned for fast rendering of web pages and portlets. This environment is often clustered for both failover and performance. Live environments often include other performance-enhancing software and hardware to help with caching, load balancing, and failover.

2.5.2. Moving content between environments


You can move content between environments using workflow or syndication.

Workflow versus syndication


With multiple servers in a typical WCM environment, it is necessary to have a mechanism that can synchronize data between multiple WCM servers. In addition, it is a typical requirement to have content pass through a formal approval process before it can be viewed on the web site. WCM provides solutions for both of these issues with workflow and syndication. New users of WCM frequently interchange these two terms as though they are one and the same. However, these two capabilities are complementary. Make sure that you understand the role of each within IBM Web Content Manager.

69 of 439

Workflow
Workflow controls the creation, approval, and run-time (live) access to an item. A workflow consists one or more stages. Tip: Normally content will not be seen by visitors on the published site (live) until the content is approved.

Syndication
Syndication is the method used by WCM Server to replicate data from one WCM Server to another. Unlike workflow, syndication is not involved in the process of approving content. Syndication is only responsible for replication of WCM assets across multiple servers. Its intended use is as an ongoing process to keep a receiving server or subscriber up to date with the latest content and design changes from the transmitting machine, which is also known as the syndicator. In versions of WCM prior to V6, a Syndicator spans the entire data store. From version 6 onwards, it is possible to partition a data store into multiple (virtual) libraries. You can configure a Syndicator to syndicate single or multiple libraries. When creating a Syndicator, you have choices for the granularity of items to be syndicated: All items: When configured with this setting, all elements of the WCM Server are replicated to the other server, including draft and expired content. Typically authoring and development servers need access to all types of content for testing purposes. This setting is common when syndicating between distributed authoring servers or between an authoring server and a development server. All live Items: As opposed to the "All items" setting, this option only replicates live content. Live content is defined as content that has been approved via workflow (live), but is not yet past its expiration date. Typically a production server only receives live data, so this setting is common when syndicating from authoring to staging or staging to production.

Tip: Syndication will always syndicate technical assets; presentation and authoring templates, components etc. By separating out design assets into their own library you can syndicate them independently of content. Refer to 5.2 Syndication for additional information.

2.6. Sample physical architecture of a website


This section describes various physical architectures you can use to build a IBM Web Content Manager (WCM) website infrastructure. Attention: You can use the architectural designs described in this section to build the environments described in 2.5 Environment type. In practice, you combine a number of these architectures across various environments. In real-world installations of IBM Web Content Manager solutions, a variety of common infrastructure designs take place.

70 of 439

The primary differences in these designs are due to variations in the basic assumptions: Site size and complexity For a relatively small web site, it might not be necessary to have individual servers dedicated to all four types of IBM Web Content Manager environments. Funding In many cases, there is a limitation in regard to the funding provided to build the IBM Web Content Manager infrastructure. In these cases, you must construct your environment as soundly as possible within the budget. However, the budget is likely to force you to reduce the infrastructure. Corporate standards Your company standard might not allow for the creation of certain types of servers. For example, it is quite common for smaller companies to omit the staging environment because it requires time and resources to perform the content review in this stage.

Important: As you look at these various architectures, remember that these are only representative architectures based on practical experience in deploying IBM Web Content Manager. Many other architectural combinations can be built based on your organizations needs. Use these architectures as a baseline from which to build your environment.

2.6.1. Basic architecture


The basic architecture (illustrated in the following figure) is the smallest acceptable design for an IBM Web Content Manager infrastructure.

In the basic architecture, a single WCM Server is responsible for all IBM Web Content Manager activities. Site visitors access this single server for content when they visit the web site. An HTTP server is placed in the DMZ to receive all requests for site content. This HTTP server acts primarily as a proxy to shield the IBM Web Content Manager server from direct access. If you use IBM HTTP Server (or Apache), the WebSphere Portal and IBM Web Content Manager server can generate an HTTP plug-in to ease configuration of the HTTP server. While this architecture is technically feasible, there are a variety of issues that make it sub-optimal.

71 of 439

Design advantages
Design advantages include simplicity. This design is simple to implement due to the limited number of components that are involved.

Design disadvantages
This architecture has the following design disadvantages: Failover or redundancy: This environment has no failover or redundancy in any layer. If any one part of the system fails, then the entire site appears to be down. Load balancing: This environment has no load balancing capabilities. There is only one IBM Web Content Manager server, and it must handle the entire workload at all times. Maintenance: To perform site maintenance, the site must be unavailable.

2.6.2. Intermediate architecture


The intermediate architecture (illustrated in the following figure) attempts to correct the primary run-time deficiencies of the basic architecture.

In the intermediate architecture, multiple WCM servers share the responsibility for IBM Web Content Manager activities. Site visitors can access any of these servers for content when they visit the web site. Multiple HTTP servers are placed in the DMZ to receive requests for site content. These HTTP Servers perform two primary functions: Proxy: The HTTP servers act as a proxy to shield the IBM Web Content Manager servers from direct access. If you use IBM HTTP Server (or Apache), the WebSphere Portal and IBM Web Content Manager server can generate an HTTP plug-in to ease configuration of the HTTP Server. Load balancing: The HTTP plug-in can be configured to provide load balancing based on a variety of algorithms. If your IBM Web Content Manager servers are not

72 of 439

similar in processing capabilities, you can set up the plug-in to load balance traffic according to server capacity.

While this architecture improves upon the basic architecture, there are still several issues that make it sub-optimal for larger environments.

Design advantages
The intermediate architecture has the following design advantages: Simplicity: This design is simple to implement due to the limited number of components that are involved. Load balancing and redundancy: If you are using IBM HTTP Server (or Apache), this environment has basic load balancing capabilities. Because there are duplicates of all components, a basic level of redundancy exists in this design. Maintenance: With multiple servers available to deliver content, site maintenance can be performed without the entire site becoming unavailable.

Design disadvantages
The intermediate architecture has the following design disadvantages: Administration: As more IBM Web Content Manager servers are added to the infrastructure, the maintenance effort to make changes increases in a linear fashion. Changes must be manually made to each server because the servers are not clustered in this design. Failover: While we have redundancy with this design, there is no automated failover in the event that a specific component fails. If any one part of the system fails, there is a likelihood that the site is down to subset of site users.

The intermediate architecture still contains one major deficiency. That is, there is no failover within the environment. To resolve this issue, we look at building a slightly more complex infrastructure that includes clustering some of the servers.

2.6.3. Advanced architecture: WebSphere Portal and IBM Web Content Manager integrated
In the WebSphere Portal and IBM Web Content Manager integrated architecture, we continue to enable IBM Web Content Manager on all of the WebSphere Portal servers. Unlike the intermediate architecture, in this environment, we cluster the portal servers as illustrated in the following figure.

73 of 439

When you cluster WebSphere Portal servers, they share an identical configuration. This configuration is managed from a WebSphere Deployment Manager server (not pictured). The Deployment Manager is responsible for synchronizing the WebSphere Portal configuration across all servers in the cluster. Thus, when you deploy a IBM Web Content Manager portlet or create a new portal page, the Deployment Manager synchronizes all servers in the cluster, which is a reduction in administrative time and effort. In addition, when you cluster the WebSphere Portal servers, the Deployment Manager can create a plug-in for IBM HTTP Server and Apache that allows the HTTP servers to gracefully failover in the event that one of the portal servers stops functioning. While setup and maintenance of a cluster take time and effort, this effort is typically small compared to the ongoing benefits provided to the infrastructure.

Design advantages
The WebSphere Portal and IBM Web Content Manager integrated architecture has the following design advantages: Load balancing and redundancy: If you are using IBM HTTP Server or Apache, this environment has basic load balancing capabilities. Because there are duplicates of all components, a basic level of redundancy exists in this design. Failover: With the addition of a cluster, the HTTP Server can provide failover for the WebSphere Portal servers. If any one part of the system fails, the entire site does not appear to be down. Maintenance: With multiple servers available to deliver content, site maintenance can be performed without the entire site becoming unavailable. Web Content Viewer JSR 286 portlet: If IBM Web Content Manager is running on all portal servers, you can use the Web Content Viewer JSR 286 portlet. By not having to communicate with an external IBM Web Content Manager server (as required with the WSRP for remote rendering), you eliminate a potential performance bottleneck. Administration: As more IBM Lotus Web Content Manager servers are added to the infrastructure, the maintenance effort to maintain the infrastructure does not increase significantly. Changes to server configurations are performed from the central Deployment Manager console.

74 of 439

Design disadvantages
The WebSphere Portal and IBM Web Content Manager integrated architecture has the following design disadvantages: Complexity: This design is fairly complex. The learning curve for installing and administering a clustered environment servers should not be underestimated. Cost: Enabling IBM Web Content Manager on every WebSphere Portal server quickly increases your infrastructure cost.

2.6.4. Advanced architecture: WebSphere Portal and IBM Web Content Manager separated
In the WebSphere Portal and IBM Web Content Manager separated architecture, we no longer enable IBM Web Content Manager on all of the WebSphere Portal servers. Instead, we create a separate tier of servers with the sole task of serving IBM Web Content Manager content as illustrated in the following figure.

As with the other advanced architecture, this configuration clusters the portal servers. However, in this configuration, we create a separate cluster for the IBM Web Content Manager servers. When you cluster the WebSphere Portal or IBM Web Content Manager servers, they share identical configurations within their respective cluster. This configuration is managed from a WebSphere Deployment Manager server (not pictured). The Deployment Manager is responsible for synchronizing the configuration across all servers in each cluster. This means that, when you deploy an updated IBM Web Content Manager portlet or create a new portal page, the Deployment Manager synchronizes all servers in the appropriate cluster, resulting in a reduction in administrative time and effort. In addition, when you cluster the WebSphere Portal or IBM Web Content Manager

75 of 439

servers, the Deployment Manager can create a plug-in for IBM HTTP Server or Apache that allows the HTTP Servers to gracefully failover in the event that one of the portal servers stops functioning. This is how both sets of HTTP Servers can provide failover for WebSphere Portal and IBM Web Content Manager requests. Note: It is technically possible to have a single set of HTTP Servers act as the front end for all IBM Web Content Manager and WebSphere Portal servers. This requires a manual modification to the plug-in that combines elements from the plug-ins created by each cluster. Because there are duplicates of all components, a basic level of redundancy exists in this design.

Design advantages
The WebSphere Portal and IBM Web Content Manager separated architecture has the following design advantages: Failover: The addition of a cluster allows the HTTP Server to provide failover for each cluster. If any one part of the system fails, the entire site does not appear to be down. Maintenance: With multiple servers available to deliver content, site maintenance can be performed without the entire site becoming unavailable. Administration: As more WebSphere Portal or IBM Web Content Manager servers are added to the infrastructure the maintenance effort to maintain the infrastructure does not increase significantly. Changes to server configurations are performed from the central Deployment Manager console.

Design disadvantages
The WebSphere Portal and IBM Web Content Manager separated architecture has the following design disadvantages: Complexity: This design is fairly complex. The learning curve for installing and administering a clustered environment servers should not be underestimated. Remote Rendering Portlet: If IBM Web Content Manager is running on a separate set of servers for all portal servers, you must use the Remote Rendering Portlet. Because this portlet communicates with an external IBM Web Content Manager server, there is a potential performance bottleneck if the network connection is poor.

Note: There is a cost-benefit analysis with regard to clustering stand-alone IBM Web Content Manager servers. The Deployment Manager automatically creates the plugin for the HTTP Server. This plug-in makes for easy setup of failover within the IBM Web Content Manager tier. If the clustering issues lead you toward not clustering the IBM Web Content Manager servers, other techniques can provide failover for the IBM Web Content Manager server tier. For example, several vendors make hardware that can perform this task. Of course, the hardware has additional costs and configuration issues. No single answer is work for all scenarios.

76 of 439

2.7. Use case sample site infrastructure: River Bend Tea and Coffee Company
This section combines all the concepts that are described in 2.5 Environment type and 2.6 Sample physical architecture of a website and build an example infrastructure for the River Bend Coffee and Tea Company (River Bend). Note: Because River Bend is a fictitious company, all of the assumptions and requirements are created solely for the purpose of this discussion. In a real world situation, there are far more issues to take into consideration when designing a web site infrastructure. We keep the example infrastructure moderately simple in an effort to ensure that we explain clearly the key issues around IBM Web Content Manager (WCM). Certainly far more complex infrastructures are in place today for working with IBM Web Content Manager. You can extrapolate the concepts that we describe in this section into larger designs as needed. DISCLAIMER: This wiki outlines an example of building a basic website using the sample site, River Bend. This sample is not intended as a best practice for development, configuration, architecture, or any other aspect, such as scalability or performance. No warranty or support is implied for the example site or sample code used.

2.7.1. Environments and infrastructure


Due to River Bends small size and a single office location, we implement the following environments: Authoring: River Bend has a single office location and a small number of content creators (approximately 10 content creator). All content creation and management is handled by employees at this location. With this requirement in mind, a single authoring server is sufficient for the needs of River Bend. Due to the small number of developers (two of them) at the River Bend's office location, this same server also serves as the development environment. Staging: The staging environment is used by River Bend for content reviewing and performance testing of the overall infrastructure. With this requirement in mind, the staging environment must mirror all functional elements of the staging environment, including the cluster and failover implementation. Production: River Bend wants to build a production infrastructure with redundancy across each element in an effort to avoid downtime. With this requirement in mind, River Bend builds a clustered environment. Because the majority of all content on the site comes from IBM Web Content Manager, River Bend implements IBM Web Content Manager and IBM WebSphere Portal in an integrated fashion.

77 of 439

The following figure illustrates the sample physical infrastructure for River Bend.

Authoring and development environment


Due to the small size of content contributors, content approvers, and developers, a single server is used for authoring (and development). An HTTP server is placed in front of this single server. While the HTTP Server functions can be handled by the WebSphere Portal or IBM Web Content Manager servers embedded WebSphere Application Server, We recommend running a separate HTTP server. Note: This design forces all employees through the HTTP server as opposed to going directly to the IBM Web Content Manager server. If you have to perform maintenance on the IBM Web Content Manager server, you must ensure that people do not attempt to access the IBM Web Content Manager server during such maintenance. By using the HTTP server, you have this control. During site maintenance, you can either shut down the HTTP server (effectively making the site appear to be down) or place a message page on the HTTP Server. In either event, you will not accidentally have people accessing the IBM Web Content Manager server at inappropriate times.

Staging environment
The syndicated content from Authoring environment is tested for its functionality, integrity and also systems integrations testing is performed at this stage.

Production environment
River Bend wants to provide for a reasonable amount of failover and redundancy within

78 of 439

their infrastructure. Furthermore, River Bend wants to implement typical security best practices to secure their infrastructure.

Private (trusted) network


The trusted network is not directly accessible to people from outside the River Bend office. A firewall is used to secure the trusted network from such access. To provide redundancy, load balancing, and failover of IBM Web Content Manager content, we implement two IBM WebSphere Portal and IBM Web Content Manager servers in a clustered configuration. Clustering the servers allows for the automated generation of an HTTP plug-in file that automatically handles load balancing and failover across all IBM WebSphere Portal and IBM Web Content Manager servers in the cluster. This plugin file is generated from the Deployment Manager server (not shown in the figure).

Demilitarized zone (DMZ)


For consumers to access the River Bend web site, they type a URL into their web browser. From a security perspective, we do not want such traffic to directly access our trusted network. To provide the security, we create a DMZ for our two HTTP servers. The first set of firewalls allows for direct access to the HTTP servers from the Internet, but only on applicable ports, such as 80 (HTTP) and 443 (HTTPS). When the HTTP servers receive a request for IBM Web Content Manager content, they pass the request through the second firewall to the IBM Web Content Manager servers. The second firewall is configured to allow traffic to the IBM Web Content Manager servers only from the HTTP servers. This stops site visitors from directly accessing servers in the trusted network. The HTTP servers have a plug-in file provided to them by the WebSphere Portal and IBM Web Content Manager cluster Deployment Manager. This plug-in automatically configures the HTTP servers to handle requests for the WebSphere Portal and IBM Web Content Manager servers. In addition, the plug-in provides basic failover capabilities in the event that one of the IBM Web Content Manager servers crashes.

Internet
The Internet is where site visitors initiate requests for the River Bend site. Our DMZ must be properly configured to allow access to the HTTP servers from the Internet and any other valid source location such as the company intranet.

2.7.2. Syndication
Syndication is used to move our IBM Web Content Manager content between the various environments in the infrastructure. The syndication flow for our infrastructure is fairly straightforward.

Authoring to staging
Because we have a single authoring server, we must set up syndication from this server to each staging server. The staging server is not a place for content modification. We only syndicate live content to the staging servers.

79 of 439

As content is approved and new technical assets are created, the staging environment collects syndicated changes from the authoring environment. During normal operation, the syndication from authoring to staging is enabled.

Staging to production
When content is reviewed in the staging area, we need to syndicate this content from the staging server to our production servers. To facilitate this, we configure one of the staging servers to syndicate its content out to all production servers. Because the staging environment collects syndicated changes from authoring server in real time, we do not want to set up a similar syndication pattern from staging to production. If we do, approved content on the authoring server would syndicate to staging and then to production automatically, which defeats the purpose of having the staging environment. To stop this from happening is to set up the syndication from staging to production but then disable the syndicator. When the web master is ready to confirm a set of changes, they perform the following process: 1. Disable syndication from authoring to staging. When the web master starts to review the content and design changes, you do not want additional data showing up in the middle of the testing process. 2. Review content in staging as needed. 3. Enable syndication from staging to production. By doing this, the reviewed and approved changes can syndicate to the production servers where they can be accessed by the site visitors. 4. Disable syndication from staging to production. When the content is pushed out to the production servers, you want to disable this syndication to ensure that no additional content syndicates to production accidentally. 5. Enable syndication from authoring to staging. When the production servers are updated, we want to start aggregating the next set of changes on the staging server. Important: Syndication is an important process. You should plan out your syndication strategy carefully prior to implementation.

80 of 439

Part 3. Building a website - River Bend Tea and Coffee Company


Part 3 covers the following topics: 3.1 Overview of key concepts and terminology for IBM Web Content Manager components 3.2 Steps to build the River Bend Tea and Coffee Company website 3.3 Managing the publishing process 3.4 Personalizing your site 3.5 Internationalization 3.6 Search - Integrating with portal search

For the purpose of providing a realistic business context to this part, we use the River Bend Tea and Coffee Company as the basis for the development scenario. River Bend Coffee and Tea Company (River Bend) is a fictitious company that uses IBM Web Content Manager (WCM) software. DISCLAIMER: This wiki outlines an example of building a basic website using a sample site, River Bend. This sample is not intended as a best practice for development, configuration, architecture, or any other aspect, such as scalability or performance. No warranty or support is implied for the example site or sample code used.

Introducing the River Bend sample website


River Bend operates a chain of 20 retail stores in 12 cities worldwide. In addition, the company runs an Internet-based retail operation, offers small-scale catering services, and has launched a certification program for employees and customers who wish to become skilled roast masters. The figures below illustrate highlights of the site and provide a brief overview of the components we build in this section.

81 of 439

The figure shown below illustrates the home page that a user sees when first entering the site. It also show seasonal products and currently featured (promoted) products.

82 of 439

The figure shown below illustrates the Coffee product area of the site.

83 of 439

The figure shown below illustrates the Community page of the site.

84 of 439

The figure shown below shows the About Us page within the site.

3.1. Overview of key concepts and terminology for IBM Web Content Manager components
This section addresses the core concepts of IBM Web Content Manager (WCM). We review the separation of presentation and content and emphasize the importance of using components within page and site design. We also describe the key items and components and outline important considerations for reuse and extensibility. This section uses the River Bend Coffee and Tea Company website an the example web site, which we refer to as the River Bend website. All concepts and technology used in the website will be explained.

85 of 439

The following figure shows the River Bend Coffee and Tea Company website.

3.1.1. Separating content and presentation


In IBM Web Content Manager (WCM), the creation of content is separated from the presentation of content. This concept is significant and provides multiple benefits. Content is created once but can be displayed in different ways using different presentations within a site or across different sites. For example, the presentation can depend on: The area of the website through which the user is navigating The user's personalization settings (for example, preferred color) Predefined presentation settings (for example, print layout and RSS feed) The device which accesses the content such as a mobile device

This approach of separating the creation and presentation of content also guarantees that a website has a consistent look and feel. If the design changes, the content parts are unaffected. Additionally, the separation supports specialization of roles and skills. Content owners can focus on content creation and site developers can manage the look and feel through HTML and other web skills. For our use case example, the River Bend website shows a Product list of tea types

86 of 439

offered. In this list the content documents are displayed as a list showing the item title as a link (see the following figure).

The link opens the document so the user can read the product details. When the product item is open, the title, summary, and body are displayed (see the following figure). This shows how the same product item can be displayed using different presentation layouts. The Product Menu shows only the title and a short description of the item. The detail layout shows the title, rating, summary and body fields as well as the tags. This illustrates how the separation of content from presentation allows the easy re-purposing and reuse of content.

87 of 439

3.1.2. Componentization and the page design concept


One of the many strengths of IBM Web Content Manager (WCM) is its componentization . The elements of a web page are created as distinct units and are pulled together in a variety of ways. Flexible web pages can be easily created by content authors and maintained by administrators. Elements can be reused on other pages and by other elements. Consideration to potential reuse should be given when designing components. For our use case example, the River Bend website, the following figure illustrates one of its web page where some typical component types are highlighted. Notice that the Offers Menu component shown here is also reused on the home page. The figure below illustrates the relationship between components and shows how a web page is a composite of design and content components. A typical web page can be constructed from the following elements: Presentation layer The layout and design that controls how the page should be presented. Aspects include: - What device or type of browser is intended for displaying the information - Font, color and other graphical components to be displayed Content layer The content itself and information about the content. Aspects include: - Content input using a template - Tools for accessing content, such as authentication (sign in) and search Information architecture layer How the content fits into the overall site information structure. Aspects include: - Navigational aids, such as a navigator, menus, and breadcrumbs.

88 of 439

Componentization of objects and items occurs across the system. Responsibility for different aspects of authoring, site design and ongoing maintenance can all be devolved to specific users and roles.

Considerations for reusability


Componentization means a user can create a component once and reuse it many times in different contexts and design areas. Reusability is maximized by adhering to the following guidelines: Use a descriptive naming convention for the objects to make it easier for other developers to identify objects for reuse. The River Bend website uses prefixes such as NAV for navigators and Menu for menus. Identify the different types of pages in the site to specify common elements between the pages. Remember that users can further customize a web page by adding additional components to the page. A site can often be broken down into a set of page styles, such as the home page, content pages, and menu pages.. You can deploy these pages across the site to maximize reuse.

89 of 439

Attention: While components can be reused many times, do not nest them too deeply or else it would become cumbersome to maintain. In addition, remember that nesting components can impact page rendering and site performance. Tips: Preferrably, all objects should be modular so that they do not rely on any other object to close a table tag or to put script tags around it. You should be able to change a component slightly without having to change any other elements that rely on that component. All functionality should remain within the component that needs it (either coded directly in the component or in the form of another complete component).

3.1.3. Key WCM functions, items, and definitions


This section discusses the IBM Web Content Manager (WCM) items that are used to build a website as well as the functions that secure and maintain the site. Functions and items are summarized and then discussed in more depth. All examples are based on the River Bend Tea and Coffee Company website (River Bend): IBM Web Content Manager uses its own terminology for objects. Most individual objects such as authoring and presentation templates, site areas, content, workflow, folders and projects are referred to as items , authoring templates, presentation templates, site areas, workflow and components as a whole are referred as item types. Anything in the Component Library is a component, for example Images, HTML, File Resources. Each content item consists of one or more elements. The elements stored are determined by the authoring template used to create the content item. Elements on an authoring template can include; date and time, HTML, file reference, Image, number, menus, navigators and selection elements such as component reference, option selection and user selection elements.

WCM elements: fields


Each content item is created and managed using a form with common and item specific fields. Common fields in all forms are: Identification fields - Name: Required field to enter the item's name that is used in the authoring environment. - Display Name: Appears in the authoring portlet navigation as well as in references between items and components. Attention: Content items in the River Bend example website use a Display Title field. This field is shown on the website while the Name field is not. It is not required to have identical values for Name and Display Title. However, doing so eases administrative tasks. Description: A brief description to describe the purpose of the field This is an optional field. Authors: Additional authors for item. This field is not a security feature. If you need security features, use security options. This field is used to reference items with ID component tags. Author and Owner fields can be used as a search or filter parameter. Owners: Additional owners for item. This field is similar to the Authors field, but for owners.

90 of 439

Item and component security


Every item and component is access protected. A five-level security model (Live, Read, Edit, Workflow, and Delete) applies.

WCM items
From a conceptual perspective, a separation between content-centric and architectural items are made. The content-centric items are used for content creation and management. The architectural items define the hierarchical structure of the website and its design.

Content-centric items
Content centric items are created, managed and used by subject matter (SME) authors and content owners. Content-centric items include the following items: Authoring template The authoring template is used by a content creator to create content by entering text, predefined resources (such as images and files), and components into fields. Categories and taxonomies Categories are predefined terms used to manage relationships between items. Categories are grouped into hierarchical taxonomies. Keywords are somewhat similar to categories. However, keywords, which are used in an authoring template field, provide a free form text entry and are not predefined or centrally managed. Workflow Because every content item has to pass through a workflow in order to be published, workflows are essential elements. Workflows control the access to, verification and approval of items. By default, workflow is enabled for content items but can be configured for most items and components by inserting the appropriate values in the aptrixjpe.properties file. Workflows consist of multiple workflow stages and actions. Content Content items are any kind of information intended to be published to a website and are created using authoring templates.

Architectural items and components


Architectural items form the structure of the site and its layout and are created and managed by IBM Web Content Manager administrators and developers. Architectural items include the following items: Library Libraries act as a container for components and contents. They can be used to separate or group items, for example to manage different sites or organize content types and design elements across large sites. Site framework (site areas) Site areas are used to define the hierarchical site framework. Content items are saved within the site framework to give content structure and context. The site framework normally defines the primary site navigation. Design components A number of design components are available, such as navigator, menu, and HTML

91 of 439

components, Image and file resources. These design components are stored in the components section in the authoring portlet. Presentation template Presentation templates aggregate all the parts required to render a web page. This includes the CSS which describes the presentation together with static and dynamic components, for example, reference to a static HTML component for the footer for all pagers and a dynamic reference to the body component of the content to be populated based on the current location

Design components are referenced within the presentation template to form the look of a web page such as the header or style sheets. Content item fields are referenced to display text on the web page.

3.1.4. Key WCM definitions - Authoring templates, category management and the site framework
This section covers an in-depth discussion on the IBM Web Content Manager (WCM) functions and items. All examples are based on the River Bend Tea and Coffee Company (River Bend) website. If you want to build the website, see 3.2 Steps to build the River Bend Tea and Coffee Company website.

Authoring template
Authoring templates are used for content creation. They provide the editing and authoring forms for content authors. Similar to document types in document management solutions, fields for text and metadata are defined in the authoring template. In addition to the common fields described in Web Content Manager fields , the following sections are provided: Profile Content form properties Content

These sections contain fields for immediate content input or references to other components.

Profile
The Profile section contains settings for Categories and Keywords. Both are ways of profiling content. A Category refers to the subject matter of your content item. For example, your content item may be of the category New Products or Latest News. Taxonomies are used to group categories. Users select from a predefined list of categories when profiling a Content item. Categories provide quick selection with no misspellings or near-duplicates but users can only select from pre-defined categories. Keywords can also be used to profile content. Unlike categories, which are chosen from a predefined list, you can enter any keywords you like when creating content items. This has flexibility but can lead to misspelt keywords and multiple, similar keywords. Categories and Keywords are used as content metadata for search and Menu definitions.

92 of 439

See Menu component for more details about how to use Categories and Keywords in menus. The following figure shows the categories and keywords fields in the Profile section of the authoring template.

Used to specify the characteristics of the item generated from the authoring template, including the type of item to be created, where it can be saved and version control strategies.

Content form properties


Content form properties are used to specify the layout and functions available to content authors when creating a new item based on this authoring template. Settings here are used to control how the authoring template appears to users. Options to control layout and to minimize options for a simplified interface, can be specified by setting layout options, default style sheets, hidden actions, toolbar display and the default help text. The following figure shows the from properties.

93 of 439

Content
The Default Content section shows the different elements on the authoring template. All fields are added to the authoring template using the element manager, as shown in the following figure.

The fields are defined by a field name and the field type. The field type is selected from a list that is either a component field, such as a Text, a Rich Text field, or a reference of a component that defined in the component library allowing the reuse of existing components. Refer to the following figure for a complete list of available fields in element manager.

94 of 439

Category management
The category management section of the item navigator defines taxonomies and categories. These items are an important, and often underestimated, elements for content that is metadata. Note: Categories are metadata for content that is used in menus and search.

Taxonomy
A taxonomy defines the collection of terms that form the categories. For distinct termsets, you can create independent taxonomies, although it might not be necessary because the number and depth of categories is nearly unlimited. Authors select categories and assign them to a content item by clicking a tree of categories. A reasonable depth of the taxonomy tree helps the user in selecting categories. A maximum of five to six levels has proven to be a good depth with which to work. You can adjust taxonomies where necessary.

Category
A category is an informational component that is used to describe what a piece of content is about. Categories used in content transcend hierarchies of architectural elements as site or site areas. Changing the navigational hierarchy is difficult, while categories should reflect business needs and are adjusted as the organization's needs change. Do not confuse categories with a site area, which is created to provide a path to that piece of content. Menu design components can use a category, via search criteria, to create menus or to create lists of related documents. For example, if the coffee business faces a boost for Ginger flavored Coffee, River Bend can add the category ginger to the taxonomy. The overall hierarchy based on site and site areas stays unchanged. Immediately after adding the ginger category to content documents, searches for ginger on the River Bend website show results without any development work. In addition, the ginger category can be removed easily without any influence on the overall navigational hierarchy of the site at any time.

95 of 439

Another example is that the River Bend website uses categories in a personalization component to identify content based on the season. The home page displays an image of the seasonal drink, whether a summer or a winter drink. The drink content itself is categorized either Summer Drink or Winter Drink categories that are under the Season Drink Category. In our use case example "Coffee freddochino" was added in the Summer Drink category. Changing the content belonging to that category will change the image on the home page that is displaying the summer drink.

Content
So far, we have discussed all the elements that you need to create content: authoring template, taxonomy and category, and workflow. Creating content for users who rarely use the authoring interface might be confusing. A common practice to apply security to all items to make sure that the authoring portlet shows only items that users need to see. Optionally, the customizable template portlet is a good choice because it allows you to hide fields that users do not need. The customizable template portlet is very easy to use. Fields are preselected, such as the authoring template and site area.

Creating content using the authoring portlet


After selecting the appropriate authoring template for the intended content, you have to select the site area to which the content is linked. The site area is the hierarchal location for the content. Navigators use this hierarchy to display the content that is linked to the different site areas. website visitors find the content when navigating through the website. After the content is saved, you can link it to other site areas to create a broader usage of the content item. This will enable the content to appear for example in two different pages due to the site areas they belong to. If authors tend to be creative with their content, you might want to give them the opportunity to express the creativity in rich text and image fields. On the other hand, limiting creativity by providing simple text fields might be the appropriate choice because all design elements are used in the presentation layer to apply corporate design, including fonts and font sizes, colors, and alignment. The same principle applies to using HTML text or PHP. Many users prefer to use pictures in their web content. Predefined image resources provide images that fit the design in size and color, which can be used through component resource fields. However, this use can limit the creativity of content authors to a reasonable level. You should define the appropriate set of options that are available to content creators and apply those options to the authoring templates to fit corporate needs and objectives for using IBM Web Content Manager.

Site framework
A site framework reflects part of the information architecture of a website. A lack of investment in the information architecture can result in a website that has a poorly designed site framework. Unfortunately, this situation is often identified after IBM Web Content Manager projects have already progressed into late stages. Avoid this situation by invest time and resources to define information architecture early. A site framework provides a hierarchical structure for the website and is the base for the final website's navigation. The content is linked to the site framework and is identified for

96 of 439

display on the website using the content's site framework information as search criteria for navigators and menus. The navigator and menu design components use the site framework to create a site map (also a navigator), navigation, breadcrumbs, and menus. Because these elements are created dynamically at run time, there are no broken links when a site area is changed or moved. The following figure shows the site framework of River Bend and the resulting site map navigator.

Site area
A site area is a unit within a site framework where content items are grouped together. You have to define the default content for a site area. The default content displays when the page is opened. Without default content assigned, the page cannot be viewed in the browser. Default content, of course, can contain component references that allow individual designs for different site areas and content pages. In the River Bend website, some content items reference a menu component. The menu displays content that is found using the menu's search criteria. (See Menu component for details about menus.) Before the content can be viewed on a website, each authoring template is paired with a presentation template. Doing so on the site level underlying site areas can inherit the pairing. Pairings on site area level can define new pairs for the specific site area and below. Site areas allow the use of the element manager to add component fields or component reference fields to the site area document. (Identical functionality is available in content

97 of 439

items.) Using this feature in site areas allows you to define design or content items to be displayed on selected site areas. Creating and maintaining site areas is performed by site administrators rather than by users or content creators. Site administrators are expected to be more literate and advanced in using components. Therefore, it might be easier for them to manipulate the design of site areas than placing the task into content creators' hands who might need extra guidance to understand the component library philosophy. Referencing a menu in a site area rather than in a content item has the advantage that the menu item is predefined in the site, and a content author does not have to know how to perform the task or which component to reference. Site areas in a site framework can be classified into parents, siblings, and children, where the site is the parent for preceding site areas but has no parent or sibling itself because it is the only root for a site framework. Site areas always have a parent and often siblings and children. A site area has the option of making it searchable. This option specifies if the site area should be searchable through portal search or not.

3.1.5. Key WCM definitions - Design and development components


In this section, we look at the design and development components. All examples are are based on the River Bend Tea and Coffee Company web site. If you want to build the web site, see 3.2 Steps to build the River Bend Tea and Coffee Company website. Having discussed all content-centric and main architectural elements, we now discuss the design and development components. Design and development components define the web site's appearance and ensure corporate identity.

Presentation templates
In the presentation template, all the aspects we have discussed and all the components come together to form the web pages that are viewed by site visitors. The presentation template combines all layout and design elements needed for the web site appearance.

98 of 439

The general presentation template of River Bend includes a style sheet and several images to create the overall layout which is consistent for all pages. IBM Web Content Manager references components in the component library by name, as shown in the following example: [Component name="riverbend/html-logo"/] [Component name="riverbend/search_form"/] [Component name="riverbend/nav-left"/]

As shown the image component, the search form HTML component as well as the navigator are referenced the same way. Due to the separation of content from presentation, the content does not play a role in the layout of a page. The content is referenced in the presentation template. Content items fields are referenced from the content library where they are stored and are referenced by the fields that make up the content. The general presentation template references the Display Title, Body, Content Image, Menu Component Reference fields using the field names as identifiers or keys. All fields are referenced in a current context. The current content is the content item to which the user has navigate using the navigator on the left side of the page. The type content states that a content item is referenced, as shown in the following example: [Element [Element [Element [Element [Element context="current" context="current" context="current" context="current" context="current" type="content" type="content" type="content" type="content" type="content" key="Summary"/] key="Image"/] key="Body"/] key="Link"/] key="Menu"/]

99 of 439

Note: If a referenced component does not have a value to display, nothing is shown on the web site. For example, the Link field is empty and therefore it does not appear on the page. Same with the components. Note: When a new presentation template is created, remember to pair it with the appropriate authoring template in the site framework. While creating the presentation template, a user may want to add an image that is stored as an image components or in the content. There is an Insert Image button that can be used to add the image instantly in the HTML. A link can be added using the Insert Link button. You can create links to: Content items, files or images Existing link components External url links

Component library
The component library is the home of all components. Each of them can be referenced with the component library tag throughout the other items and also in the components themselves.

Navigator component
A navigator provides a mechanism that allows users to move through the site. A navigator uses the site framework to automatically create links to different parts of the site (site areas) or pages (content) in the site. Because it is based on the site framework, the navigator displays the hierarchy of the information architecture. Thus, when a site framework or a site area changes, the navigator is updated dynamically, eliminating the need for re-coding and preventing the possibility of broken URL links.

3.1.6. Key WCM definitions - Menu component


This section describes the menu component within IBM Web Content Manager (WCM). A menu is ultimately a search mechanism that groups together related documents based on specific criteria such as categories, keywords, authoring templates, site areas, and so forth. To the visitors of the website, menus and navigators provide similar functionality, allowing the visitors (users) to navigate around the site or to locate specific content. A menu differs from a navigator in the way it is constructed and in the way it displays the resulting links. A menu displays content, while a navigator displays site areas for navigation. Think of a menu as a list of documents grouped by a number of different criteria such as categories, site areas, and keywords. When an item is created, changed, or deleted, menus are dynamically updated, and the list of links displays the recent changes. This eliminates the need for re-coding and prevents broken links.

100 of 439

Important: Menus are updated automatically to reflect changes in the content library. Consistency is maintained by the system. Menus display links as images, icons with text, links with a summary, or other combinations. See the following figure showing menu construction from various selection criteria.

Menu options
The following options define a menu.

Menu element query site area


The Selection Criteria can create very granular menus. Similar to navigators, ancestors and descendants can be included in the menu selection by select the Include ancestors and Include descendants options. By expanding Further Options, the user can: - Select User-specified rendering portlet, which searches for site areas defined in the settings of the rendering portlet.

101 of 439

- Select current content which searches for content that is in the same site areas as the one being currently rendered. Enter a query string. The selection would be based on the parameters sent. Choose to merge selected authoring templates with included authoring templates. This option merges the content selected by the menu based on the settings made in this section with those content matching the selected authoring template. Choose to replace selected authoring templates with included authoring template. This option overrides the contents found by the menu based on the settings made in this section over the ones from the selected authoring template.

Menu element query authoring template


The Matching Authoring Templates option identifies the content that is created using the authoring template that is selected for this option. This option is not related to the hierarchical site framework structure but it enables content to go beyond that and be independent. By expanding Further Options, the user can: - Choose the current template to be selected. Enter a query string. The selection would be based on the parameters sent. Choose to merge selected authoring templates with included authoring templates. This option merges the contents that are found by the menu based on the settings made in this section with those contents that are found with the selected authoring template. Choose to replace selected authoring templates with included authoring template. This option overrides the contents found by the menu based on the settings made in this section over the ones from the selected authoring template.

Menu element query categories


Matching content associated with categories uses content categorization. Independent from where the content is stored in the hierarchical site framework, all content containing the categories specified are found. Selecting the match all categories options means content must match all the categories specified using a Boolean AND relationship. Similar to navigators and site areas, ancestors and descendants can be included in the menu selection by select the Include ancestors and Include descendants options. By expanding Further Options, the options are similar to the ones used in the site area search criteria. For the current content and current user option, the user can narrow down the search by restricting certain categories: - The option for selecting current content, searches for contents profiled with the same categories used to profile the current rendered content. - The option for selecting current user, searches for content profiled with the same categories as those selected by the current user.

102 of 439

Menu element query Keywords


Somewhat similar to matching against categories, the Keywords options selects content profiled with keywords. Matching content using keywords can be more difficult as keyword entry is free-form, no guidance on keyword spelling is given, and users do not select from a list of existing keywords. Further Options provides additional control for the current content and and user: - The option for selecting current content, searches for contents profiled with the same keywords used to profile the current rendered content. - The option for selecting current user, searches for content profiled with the same keywords as those selected by the current user An option to exclude the current content from the results returned when applicable is also available.

The following options define the presentation of content using the menu MENU-Site Area
The current document can be excluded in the displayed menu by selecting the exclude current document from. That is only valid if the case is applicable, which reminds you that a menu can be displayed in a content context and also can be based on a site or site area. The ascending order for results option is selected. Alternatively, deselecting the field creates a descending order based on the sort key of Results Primary, Results Secondary, and Results Tertiary sort key fields. Available sort keys are: name, description, published date, last modified date, title, expiry date, general date One, and general date two. Set the results per page to zero (0) to allow all items to display on one page regardless of how many are found. Increasing the number changes the number of documents that display. For example, changing the results per page to 3 displays documents 1 through 3 on page 1, and documents 4 through 6 on page 2. For a better overview, limit the number of displayed documents to no more than 10. Also, sort in reverse order so that the newest document is at the top of the list. The Start Page field defines which page results are displayed on. The maximum pages to include option limits the total number of pages that will be displayed and returned for the menu. The pages to read ahead option controls the number of result pages to read ahead when using a page navigation element.

The following fields define the design for the menu through text, tags, and components
Header Design can specify a header text or component to appear before the menu list. The appearance for the Menu elements are defined in the Component Design for each matching Content field. The footer defines the design below the menu and separator between the menu element. The layout if no results are returned defines the layout if there were no matching content items. No header nor footer will be displayed in that case.

103 of 439

3.1.7. Key WCM definitions - Other components


This section describes other key components within IBM Web Content Manager (WCM) such as text component, rich text component, file resource component, HTML component, image component, and JSP component. All examples are based on the River Bend Tea and Coffee Company (River Bend) website,

Text component
Text components can be used to store text or HTML as reusable text modules. For the River Bend website, we create text components to describe standardized processes for coffee and tea production, such as roasting or picking. Note, tea picking is different from coffee picking. After you define the text components, you can use them as standard text blocks in the coffee and tea product description pages.

Rich text component


The rich text component is similar to a text component. However, rich text components can reference one or more other components using tags and also provide a rich text editor for formatting text and HTML. You can use a rich text component on the River Bend website on the coffee and tea product pages to provide a standardized form for rating the products. The rich text component references the form and its components such as design and buttons.

File resource component


The file resource component provides a central repository for files, images, style sheets, and so forth. Authors and site designers can reference the file resources. The River Bend Three Column Table presentation template references the Riverbend.css style sheet as a file resource component as shown in the following example: <link rel="stylesheet" href='<Component name="Riverbend.css"/>'>

Another example of a file resource component is graphics that are used to add polish to the River Bend website. For example, the navigators do not use a symbol (such as arrows) to indicate activated sections. You can store a graphic as a file resource to serve as indicator for an activated selection.

HTML component
HTML components are very flexible. An HTML component contains HTML code and often references items, content fields, and components.

Image component
Images that are used throughout the website can be stored directly into image component fields in the authoring templates. In this case, the author has the option to define the size of the image, which might or might not fit the overall design. Defining

104 of 439

images as image resources provides identical images for re-usage. The River Bend website uses multiple image components as consistent design elements in the presentation templates. The images are re-used in the different components and presentation templates.

JSP component
The JSP components store the path to a JSP and error message text in case the JSP is not available. An extended discussion on JSP in combination with the API is found in 4.3 Programming.

Taxonomy component
Taxonomy components are often used together with personalization to allow users to select categories of interest from a list. Alternatively, you can use the taxonomy component to display categories for navigation instead of site areas. Be aware that this option works only for authenticated users. If your site requires the taxonomy components option for anonymous users, the implementation is more complex. In this case, you need to create a JSP for an imaginary user for which the component is displayed. The taxonomy component displays a list of categories, starting with the selected start area (in this case, a category), and displaying the depth according to the Depth field. You can define further selection criteria by using a Profile Search Rule. The remaining fields are used to format the displayed categories with a header and footer. The Unselected Components and Selected Component fields contain special layout for selecting categories, which could be check boxes.

User name component


User name components display the name of the current user known as the user name element, for anonymous users or authenticated users and to create different design experiences based on user names. User name components are defined as follows: If an anonymous user is using the site, then it displays the Anonymous User Design, or else the User Component Design, where Anonymous User Design and User Component Design are the fields that are available in the component form. These fields contain designs that are based on HTML code or component references. A good example for a user name component is a welcome message on a website's home page for an authenticated user. The anonymous user does not see a welcome message.

Authoring tools component


IBM Web Content Manager allows site designers to add direct access to some authoring functions from a web page: Create new content items.

105 of 439

Perform inline editing of the current content item through a pop-up window or by navigating to a separate page. Delete the content item displayed in a web page. Approve or reject the current content being previewed. These are only visible to approvers who open a draft content item from a URL sent by an email workflow action used in a workflow stage.

The River Bend website uses the authoring tool component for the Edit and New functionality. See the following figure that shows the authoring tool in the tea area.

For more details on authoring tool, refer to 4.1 Personalize the authoring tools.

Link component
A link component stores a reusable link to an IBM Web Content Manager item or to an external website that you can use in multiple places across the site.

Page navigation component


Page navigation controls navigation between a set of pages created as a result of a menu component, search component or navigator component. A page navigation component provides the following options:

106 of 439

Shuttle control related to current page. For example, next page, previous page, go last, and go first. Paging control, showing an index for all the available pages or a continuation link for the pages. Jump to page, displaying a text box, where the user can enter the page number if known beforehand.

Refer to the following figure for the available options for the page navigation component and the result in the figure after that.

The following html could be added to the footer to display the current page number and the total number of the pages. 1: 2: <p><strong>Ex: Page 2 of 10 </strong></p> 3: <pre> 4: Page &lt;PageInfo value=&quot;currentPage&quot;/&gt; of &lt;PageInfo value=&quot;unknownPages&quot; knowntext=&quot;&quot; unknowntext=&quot;&quot;/&gt; &lt;PageInfo value=&quot;totalPages&quot;/&gt; 5: </pre> Refer to 3.2.7.6 Creating the page navigation component for a complete example of the page navigation. The following figure shows the page navigation controls.

107 of 439

3.2. Steps to build the River Bend Tea and Coffee Company website
In this section, we provide detailed steps of how to build the the portal and IBM Web Content Manager (WCM) based website for the River Bend Tea and Coffee Company (River Bend).

3.2.1. Creating information architecture for River Bend


In preparation for building the River Bend website, you should have already agreed and defined the information architecture for River Bend and the wireframes. Refer to the sections listed below for defining the site information architecture , navigational elements and site components:
2.3 Information architecture and site design - 2.3.1 Defining information architecture - 2.3.2 Key considerations and decision processes - 2.3.3 Designing information architecture

3.2.2. Creating and setting up the libraries


Libraries are a specific container used to hold content and components related to one or more websites. Libraries can also be a useful approach when separating design and site elements (called components) and content, An example of this might be where a single library contains the CSS, images and other libraries contain the HTML and other design components for the site. Access to a library and the resources within the library require security access permissions to be set. These are defined at the library level during the creation step, and can be modified afterwards. Creating a library and setting access permissions require an Administrator level role. In this section we describe how to create and setting up a library used for the River Bend site.

Creating the library


To create the library, perform these steps:
1.

Log in to the WebSphere Portal, open the Administration page, and navigate to Portal Content -> Web Content Libraries as shown in the following figure.

108 of 439

2. Click the Create new Library button, and type Riverbend in the Web content library name field. 3. Type a summary for the library into the Description field, for example: The River Bend Tea and Coffee company sample site. 4. Select English as the default language from the Language drop-down box. 5. To safeguard our library from being accidentally deleted, select the Prohibit library from being deleted box. 6. Ensure the checkbox for the library being Enabled is selected as by default. 7. Click the OK button. The following figure shows the completed steps prior to clicking the OK button.

The newly created library should now be visible in the list of Web Content Libraries as shown in the figure below.

109 of 439

During the creation of the library, you would have seen an option to Include default items in the new library, as shown in the second figure. Select this checkbox if you want to create default content items and associated components in the library. For our case, we don't want to select that option.

Defining library access permissions


At the library level, we can define the access permissions a user or group has to the library. This level of permission will restrict visibility of the library within the Library Explorer interface, Additionally, at the library level, we can also set permissions to the resources contained within the library, for example Authoring Templates, Components, and Content. It is important to set the resource permissions appropriately to ensure only the right access and visibility is given. For example a typical content author/editor should not be concerned about Presentation Templates. For a detailed list of the different roles and their respective access rights, refer to IBM Web Content Manager 7 wiki product documentation.

Setting user and group access to the library


To create users and groups, see the following section: 3.2.2.1 Creating the users and groups. In order for a user to see the library in the Library Explorer, the User role must be applied to the appropriate users/groups. The following outlines the steps to apply access for the wcmadmins, riverbend_ContentCreators, riverbend_ContentApprovers, and riverbend_Designers groups created previously. 1. Click on the button to set permissions for the Riverbend library. 2. Click on the Edit Role button to apply Administrator access permissions. 3. Click the button and select the wcmadmins group. 4. Complete steps 1 to 3 to add the riverbend_ContentCreators, riverbend_ContentApprovers, and riverbend_Designers to the Contributor role. All_Authenticated_Portal_Users to the User role. 5. Uncheck the Allow Propagation of the User role. This allows us to specify the resource permissions in the next step. The following table shows the permission access for the library. Roles Allow Allow User / Group

Propagation Inheritance
Administrator Manager Editor Contributor Yes Yes Yes Yes Yes Yes Yes Yes riverbend_ContentCreators, riverbend_ContentApprovers, wcmadmins

110 of 439

riverbend_Designers User No Yes All_Authenticated_Portal_Users

With the library permissions set, we can now set the permissions to the resources (item types). Permissions at this level restrict visibility of item types such as authoring templates and components in the Library Explorer interface.

Setting user and group access rights to specific item types


To set users and group access rights to items types, follow these steps: 1. Click on the button to set permissions for the Riverbend resources. 2. Click on the button to set the permission for the resource Authoring Templates. 3. Click on the Edit Role button to apply Editor access permissions. 4. Click the button and select the riverbend_Designers group.

to save. 5. Click the button 6. Using above steps 1 to 5 set the access permission for the item type listed in the following table. Add the user groups specified in the tables below to the defined roles. For components access rights setup: Roles Allow Allow User / Group

Propagation Inheritance
Administrator Manager Editor Contributor User Roles Yes Yes Yes Yes Yes Allow Yes Yes Yes Yes Yes Allow User / Group

For content access rights setup:

Propagation Inheritance
Administrator Manager Editor Contributor User Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes riverbend_Designers, riverbend_ContentCreators

111 of 439

For presentation templates access rights setup: Roles Allow Allow User / Group

Propagation Inheritance
Administrator Manager Editor Contributor User Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes riverbend_Designers

For set areas access rights setup: Roles Allow Allow User / Group

Propagation Inheritance
Administrator Manager Editor Contributor User Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes riverbend_Designers

For taxonomy access rights setup: Roles Allow Allow User / Group

Propagation Inheritance
Administrator Manager Editor Contributor User Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes riverbend_Designers

For workflow and workflow elements access rights setup: Roles Allow Allow User / Group

Propagation Inheritance
Administrator Manager Editor Yes Yes Yes Yes Yes Yes riverbend_Designers

112 of 439

Contributor User

Yes Yes

Yes Yes

Selecting the library for use in the River Bend site


By default, the Riverbend library is not automatically listed in the Library Explorer. To select the library to be used in Web Content Manager, perform these steps: 1. Navigate to Applications > Content > Web Content Management page. 2. Expand the Preferences menu and click the Configure option.

3. Expand the collapsed Library Selection section.


4.

Using the button move the Riverbend library from the Available Libraries to the Selected Libraries, click OK.

5. Select the checkbox Show new libraries in the library explorer, This option removes the need to manually add the libraries to the authoring interface in future. 6. Expand the collapsed User Interface Options section. 7. Set the value of the Maximum rows per table to 25 or higher. This allows you to see more items on the screen, for example a longer list of content within a site area. 8. Click the OK button to save these preferences,

113 of 439

The current library used now is RiverBend as shown in the following figure.

Creating the users and groups


The River Bend website, its content, design components, and administration functions is supported by a distributed team of people from local store manager to staff at the headquarters. In order for this team of people to carry out their various tasks on the website they will need to be assigned to appropriate groups and given the right access control permissions. The access control described in later sections define visibility of items, and the availability of functions used in creating and managing content.

Creating the users


To create a user, perform these steps: 1. Log in to the WebSphere Portal, open the Administration page, and navigate to Access > Users and Groups as shown in the following figure.

2. 3. 4. 5. 6.

Click the New User button, and type gcloud in the User ID field. Type a suitable password and reconfirm the password in the next field. Type a Glenn in the First Name field. Type a Cloud the Last Name field. Click the OK button to save and create the user.

114 of 439

New user creation

Using the steps 2 - 6 create the following users: Samantha Daryn (sdaryn) Misha Thompkin (mthompkin) Vivian Hanley (vhanley) Jim Lendler (jlendler) Rita Ferrar (rferrar) Mike Motley (mmotley) Amy Blanks (ablanks) Dina Maroni (dmaroni) Harry Greene (hgreene) Paul Clemmons (pclemons) Liz Schonfield (lschonfield) Sheila Durgan (sdurgan) Jasmine Harj (jharj) George Bandini (gbandini) Larry Moriarty (lmoriarty) Paula Starky (pstarky) Natalie Olmos (nolmos) Glenn Cloud (gcloud)

115 of 439

1.

Creating the groups


Using a similar process to above we can create the appropriate groups for these users. To create a group, perform these steps from the same administrative section as above (Access > Users and Groups): 1. Click the New Group button, and type riverbend_ContentCreators in the Group ID field. 2. Click the OK button to save and create the user. Using the 2 steps above create the following users: riverbend_ContentCreators riverbend_ContentCreatorsMarketing riverbend_ContentCreatorsStoreMgr riverbend_ContentCreatorsOps riverbend_ContentApprovers riverbend_ContentApproversHQ riverbend_ContentApproversHR riverbend_ContentApproversLegal riverbend_Designers wcmadmins

Nesting groups and assigning users


At this stage we have the Riverbend website team created, and several groups also. To make assigning access permission easier we can assign the users to groups, and nest the groups in a hierarchy. From the user and groups pages using the Search button, list all groups. You should now see all the groups created as shown in the figure below.

116 of 439

1. Click the name of the group riverbend_ContentCreators, this will place you inside the group 2. Click the Add Member button 3. Click the Search button, note the default is to search for Groups 4. Tick the check box beside the groups riverbend ContentCreatorsMarketing, riverbend ContentCreatorsOps, riverbend ContentCreatorsStoreMgr 5. Click the OK button to save your selection. Follow the steps above for riverbend_ContentApprovers, adding the groups riverbend_ContentApproversHQ, riverbend_ContentApproversHR, riverbend_ContentApproversLegal For all the groups currently defined we now need to ensure that the Riverbend website team are assigned correctly. Assigning users to groups is a similar process to that of above with nested groups: 1. Click the group riverbend_Designers, 2. Click the Add Member button 3. Select Users from the search dropdown box. Set the Search by: dropdown to uid, and the Search parameter to " * " (asterisk) - this will show all users.

117 of 439

4. Tick the box beside the user Glenn Cloud. 5. Click the OK button.

Using the table defined below by the Riverbend administrators add the following users to groups. Site Role Creator (Author) Group riverbend_Content riverbend_ContentCreatorsMarketing riverbend_ContentCreatorsStoreMgr riverbend_ContentCreatorsOps User(s) Samantha Daryn Rita Ferrar, Mike Motley, Samantha Daryn Amy Blanks, Dina Maroni, Harry Greene, Samantha Daryn Misha Thompkin, Vivian Hanley, Jim Lendler, Samantha Daryn Approver riverbend_ContentApprovers riverbend_ContentApproversHR riverbend_ContentApproversHQ riverbend_ContentApproversLegal Paul Clemmons Liz Schonfield, Sheila Durgan, Paul Clemmons Jasmine Haj, George Dandini, Paul Clemmons

118 of 439

Larry Moriarty, Paula Starkey, Paul Clemmons Designer Site Administrator riverbend_Designer wcmadmins Glen Cloud Natalie Olmos Glenn Cloud

3.2.3. Creating the site framework


This section describes creating the site framework for the River Bend site. In the following steps we describe the process for building the site framework. Creating the site areas Re-arranging the site area order

Creating the site areas


To create the site areas:
1.

Click on the New button in the Library Explorer, and select Site Area shown in the following figure.

119 of 439

2. Type in Riverbend for the Name and Display Title fields. 3. Select the Description field and type; Site root for the River Bend Tea and Coffee Company. 4. Click the Save and Close button. You should now see in the Library Explorer the newly created site area, shown in the following figure.

Creating the additional nested site areas


The suggested framework for the example consists of a top level site area and many nested site areas within it.. After creating the top level Riverbend site area, create the subsequent site areas beneath using the following steps:

120 of 439

1. Click on the Riverbend site area, you will now see in the breadcrumb menu that you are inside the Riverbend site area.

2. Click the New button and select Site Area as described previously. 3. Note that the location of your next site area has now defaulted to RiverBend/Riverbend (Library/Site Area). 4. Type in Home for the Name and Display Title fields. 5. Click the Save and Close button. 6. Repeat steps 1 to 5 to create another site areas with Home, where its Name is Products, and Display Name is Products also. At this point you have started to build out the nested site areas of Riverbend as shown in the figure below. If you expand the site framework view, you see the Home site area within the navigational hierarchy, as also shown in the figure below.

At this point, you can repeat this process to create the site areas that are shown in Figure 5. Repeat step 1 through 5 again to create the rest of the site areas for this example. The above figure shows the Library Explorer configured to display the Library Explorer in a hierarchical view, this has been configured just to emphasise the structure you are creating for the Riverbend Site Areas. This view is not the default, however can be button from the Display: menu. Selecting the enabled by clicking on the will restore the default at any time. button

Note: Selecting either Start or End for the link order determines the sequential placement of a site area within the list of multiple site areas. If the order of the site areas listed does not match the exact example that we provide, do not worry. Refer to section Rearranging the site area order for details about how to re-order site areas. Tip: Use Save As button to create copies of a site area that is already open in edit

121 of 439

mode.

Figure 5 - Overall site structure

Hint: The Names you see in Figure 5 are the display names for the Site Area items.

Rearranging the site area order


Menus, Navigators and other components display the order of the Site Areas as they are displayed in the Library Explorer. After you create a Site Area, you can always modify where the site area is listed. Follow these steps to move the Careers site area in the About Us site site area, to the second position from the top. 1. In the Library Explorer, expand the site areas until you are at the About Us site area. 2. Tick the selection box to the left of the Careers site area, and from the More Actions menu, click Move.

122 of 439

3. Expand the Riverbend > Home>About Us site areas. 4. Select Company site area. 5. Choose After from the Placement option at the bottom of the screen shown in the following figure.

6. Click the OK button.

123 of 439

The Careers site area is now displayed after History site area as shown in the following figure.

Note: Within this section we describe specific steps for rearranging the order site area items within the overall site framework. Keep in mind that you can use the Move button to move a specific site areas to any library, or site area within the framework.

Creating other pieces of site framework


There are also other pieces that need to be created for the site framework as well. We cover the following topics in the following sections.

Creating the page templates


The River Bend website is constructed using portal pages containing 3 or more Web Content Viewer (JSR 286) Portlets. These portlets in turn surfacing both content and web components. To reduce the number of steps required when creating portal pages containing a regular set of portlets (Web Content Viewer or others) we can use portal page templates. This section describes steps to create page templates for the River Bend site. Page templates are visible from the Portal Administration interface, and listed under Portal User Interface > Page Templates. To create the 2 page templates required for River Bend follow the steps outlined below: 1. Click on Administration > Manage Pages. 2. Click on Content Root > Administration > WebSphere Portal > Portal User Interface > Page Templates. You should now see the Sample Web Content Page Template template page. 3. Click the New Page button 4. Set the Title to Riverbend 3 Portlet Layout. 5. Set the Unique Name to wps.content.template.riverbend_3. 6. Set the Friendly URL name to riverbend_3layout. 7. Click the OK button.

124 of 439

The following figure shows the Portlet page template.

Note: Page templates need to have a unique name that is prefixed wps.content.template. to ensure the Page Template dropdown box is populated correctly when using the New Page from.. option. Follow the steps as above, this time using the unique name of riverbend_4layout.

River Bend is using IBM WebSphere Portal and Web Content Manager v7.0.0.1 CFx, This version allows for pages to be created from pages template via the Administration Interface, and not the page builder 2 theme.

125 of 439

Adding Web Content Viewer Portlets


When a page template is used to create a new page, the layout, configuration and importantly the portlets placed on that template are inherited. The following steps add the Web Content Viewer Portets to the page: 1. Click the template. Edit Page Layout button for the Riverbend 3 Portlet Layout page Add Portlets

2. From the Edit Layout section of the page, click the button. The following figure shows the Web Content Viewer Portlet:

3. Select the Search by: dropdown to Contains in Title, and type in Web Content Viewer. 4. Tick the checkbox beside the portlet, and click the OK button. 5. Repeat the steps above to add 3 more portlets to the page. Done button to save and close the template. 6. Click the 7. Complete the steps above for the Riverbend 4 Portlet template page. This time adding one more portlet to the page.

Creating the pages


Using the page template we created earlier we can now create the portal pages that comprise the River Bend website. This section describes the steps required to create the portal page hierarchy for the River

126 of 439

Bend site as shown below.

The River Bend page hierarchy is comprised of a main Home page level, this is the primary entry point to the website. The Products, About Us and Community levels are portal labels, as such do not contain content. Beneath the labels are pages that contain specific site area information, for example Coffee, Tea, Locations, and News content.

Creating site pages


Create the River Bend pages and labels by following these steps: 1. Within the Administration Interface; from the Portal User Interface > Manage Pages section select the Context Root link. 2. Click the New Page from button. 3. Type in the Title, River Bend Home. 4. Type in riverbend_home for the Friendly URL name. 5. Select the Riverbend 4 Portlet Page Layout from the Page Template dropdown box. 6. From the Web Content Mappings option click the Select link to define the WCM library / content mapping for the page. Choose the Riverbend library, Riverbend site area. 7. Click the OK button You should now see the page you create in the Manage Pages section as shown below. If you have a number of other pages already defined you may need to navigate to Page 2 Next Page button. using the

127 of 439

Creating labels
Follow these steps to create labels: 1. Select the Riverbend Home title link, this will place you within that page in the portal page hierarchy. 2. 3. 4. 5. New Label button. Click the Type in Products for the label Title. Type in riverbend_products for the Unique name:. type in products for the Friendly URL name:. OK button.

6. Click the

128 of 439

The following figure shows the page label.

Following steps 2 to 6, create the Labels for the About Us, and Community site area sections. Using steps 1 to 7 from the section Creating Site Pages, create the hierarchy of pages below each of your labels as follows: Products [label] - Coffee - Tea - Soft Drinks - Food About Us [label] - History - Locations - Products - Careers Community [label] - News - Events

129 of 439

- Blog - FAQ

Creating detail pages


In previous steps we created the top level navigation labels and their sub pages for content. In this next section we will create further "detail" pages to allow the navigation to individual content items (e.g. a news, event or product item). Create the River Bend detail pages by following these steps: 1. Within the Administration Interface; from the Portal User Interface > Manage Pages section select the Context Root link. 2. Navigate from the context root to the Riverbend Home > Products > Tea page. 3. Click the New Page from button. 4. Type in the Title, Tea-Detail. 5. Type in the Unique Name, Tea-Detail. Note: The unique name is a important variable to set, this name is used when configuring the Content Viewer Portlet to select content to be broadcast to. 6. Type in the Friendly Name, Tea-Detail.

Page properties of the Tea Detail page 7. From the Web Content Mappings option click the Select link to define the WCM library / content mapping for the page. Choose the Riverbend library, and select the Tea site area.

130 of 439

Content mapping for the detail page 8.

Click the OK button. You should now see the page you create in the Manage Pages section, at this stage we want to place a single Web Content Viewer portlet on the detail page to display content. As we are within the portal administration interface we can use the Edit Page Layout button to achieve this. An alternative to this is to use the page Actions available when using the PageBuilder2 or Rivervend theme (see image below).

Alternate page customisation option (not used here)

9. 10. 11. 12. 13. 14.

Click the Edit Page Layout button Click the + Add portlets button Change the Search by: scope to Title contains Type in the Search: box, 286 to locate the Web Content Viewer portlet Tick the checkbox to the right of the portlet, and click the OK button. Click the Done button.

You should now have configured the Tea-Detail page. As the Riverbend uses several detail pages, use the steps outlined above to complete detail pages for the following: Products - Coffee - Tea

131 of 439

- Soft Drinks - Food Community - News - Events - Blog - FAQ

3.2.4. Creating the taxonomy and categories


This section explains how to build taxonomy supporting the River Bend site. Note: The process of building a taxonomy and subsequent nested categories performed in this section is a key step for creating a informal structure for content metadata. You should consider this a behind-the-scenes function to provide a method for content authors to easily organize and tag site content.

Creating the taxonomy


Follow these steps to create the taxonomy for the River Bend website: 1. Log in to WebSphere Portal, open the Applications page, and navigate to Web Content Management, you should now see your library listed in the Library Explorer as shown below.

2. Click the Riverbend library name. 3. Click the New button, and select Taxonomy from the drop down list. 4. Type in Riverbend for the Name and Display Title fields. 5. Select the Description field and type; The Riverbend content taxonomy.

132 of 439

The figure below shows the created taxonomy for River Bend.

6. Click the Save and Close button. While the River Bend sample website only uses a single taxonomy, IBM Web Content Manager (WCM) allows you to create as many as required to support your needs.

Creating categories within taxonomy


With the Riverbend taxonomy created in the previous steps, use the following steps to create the categories within the taxonomy. Note: The WCM Library Explorer interface is contextual, this means you are provided with the most appropriate options first, or selections are defaulted for you. If you have selected the taxonomy Item within Library Explorer, all categories create subsequently will default their selected location to this. This is useful in the next steps when creating numerous categories at once. To create categories within the taxonomy:

133 of 439

1. Click the Riverbend taxonomy you created in the previous steps. 2. Click the New button and select Category. Category should be listed at the top of the drop-down list as it's contextual to where you are currently located. 3. Type in Career for the Name and Display Title fields. 4. Click the button Save and Close. 5. Repeat steps 2 to 5 to create the following list of categories, noting that some categories are nested and have sub-categories.

3.2.5. Creating the workflows


At River Bend, the level of approval and review of content on the website varies by area (where and what in the site) as well as the individual departments that are authoring & editing the content. As such River Bend implements prescribed workflow via authoring templates, and in some cases workflow is disabled on items altogether as those items are managed differently. This section provides the steps to create workflow actions, stages, Express workflow and Approval workflow for the River Bend site. For additional details on workflow, refer to 3.3.2 Working with workflow - Creating basic and custom workflows .

Overview of the workflows for the River Bend website


River Bend uses three different ways of publishing information: Approval - This is the default working mode. Items may have four states (draft, approval, published and expired Express: Covers exception items, used primarily to directly publish from draft to published state

134 of 439

None: No approval or review is required

This diagram shows a graphical representation of the workflows in use at River Bend.

River Bend workflow consists of the following elements: Workflow stages are represented by the rectangular shapes. Workflow states are represented by the shape colour: - Draft items in orange, also denoted with a D - Published items in green, also denoted by a P - Expired items in blue , also denoted by a E Workflow actions within a stage appear before and after each shape, also surrounded by a grey box to represent what will be executed when the item enters or exits that stage.

Note: For specific steps on how to create these, refer to the document .

Creating the workflow actions


To create the workflow actions: 1. 2. 3. 4. Navigate to the Riverbend library. Click the New button and select Workflow Action > Publish Action. Type in the Name: field, Publish. Click the Save and Close button.

135 of 439

Additional actions are required. Use the steps 2 to 4 above, create the actions outlined below: 3.3.2 Working with workflow - Creating basic and custom workflows. Action Email for rejected Content Expired Move content on expiry date Generate thumbnail Action Type Email Action Expire Action Scheduled Move Action Custom Action

For the "Move content on expiry date" action, select Expiry Date from the Date Type list and choose an appropriate date to see this action, for example tomorrow's date. For the "Email for rejected Content", select E-mail authors. E-mail Stage Approvers is selected by default. Add an apology message in Additional e-mail text.

Creating workflow stages


To create workflow stages: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Navigate to the Riverbend library. Click the New button and select Workflow Stage. Type in the Name: field, Draft. Click the Save and Close button. Repeat the steps 2 through 4 outlined above for the Approval Stage. Click the New button and select Workflow Stage Type in the Name: field, Published. In the Properties section, click Actions under Execute on Entering Stage to select an action that is performed on any content that enters this stage of the workflow. Click the Add button. The Execute on Entering Stage dialog box opens. It lists all the available actions. From the list, choose the following Publish, Generate thumbnail, Move content on expiry date. Click the Save and Close button. Repeat steps 5 through 10 to create Expired stage, ensure that you set the Execute on Entering Stage action to Expired. Repeat steps 5 through 10 to create Reject stage, ensure that you set the Execute on Entering Stage action to Email for rejected content.

11. 12. 13.

Creating the Express workflow


The Express Workflow is the workflow that publishes content immediately without approval. Using this workflow allows specific River Bend departments and users the ability to save their content in draft and then publish immediately. An express type workflow can be useful where content updates require swift publishing, for example a spelling mistake, incorrect information or wrong product image. Follow the steps outlined below to create the Express workflow:

136 of 439

Click the New button and select Workflow Type in the Name: field, Express Select Workflow Stages in the Properties section. Click the Add button Select Draft, Published and Expired from the list of workflow stages. Using the arrows to the right of the listed stages, move the stages into the order listed above in step 5. 7. Click OK button.

1. 2. 3. 4. 5. 6.

Creating the Approval workflow


The Approval workflow is the workflow that allows content to go through an approval stage prior to being in a published state. The content using this workflow can be rejected at any stage in the workflow, and will also expire after publication based upon a date. Follow these steps to create Approval workflow: 1. 2. 3. 4. 5. Click New button and select Workflow Type in the Name: field, Approval Click Select Workflow Stages in the Properties section. Click Add button. Select the following: - Draft - Approval - Published - Expired Select the Draft stage Using the arrows to the right of the list of stages, move the stages into the order listed above in step 5. Click the OK button. Click Select Reject Stage Select the Reject stage Click OK button. Click Save and Close button.

6. 7. 8. 9. 10. 11. 12.

3.2.6. Creating the authoring templates


The creation of content at River Bend is facilitated by providing its content authoring community with several authoring templates for specific sections, or functions of the website. The website captures different types of content for different sections areas (e.g. Products, News,and Events) however not all areas have a 1:1 mapping, generic authoring templates are used where information can be captured in generically names fields. For example, Body, Image, Link, Component Reference. This section provides the steps to create the authoring templates for the River Bend site.

137 of 439

River Bend authoring templates


The River Bend website contains the following authoring templates: Article Essential Link Event General Landing Page Locations News Products Recipe Vacancy

Creating the authoring templates


To create authoring templates: 1. Navigate to the Library Explorer, Applications > Content > Web Content Management. 2. Select the Riverbend library in the Library Explorer 3. Click the New button, and select Authoring Template (see figure below).

4. Type in the Name: field, Event. 5. Type in the Display title: field, Event. 6. Type in the Description: field, Authoring template for Events. 7. Click on More Actions Manage Elements button 8. Select Date and Time from the Element type: dropdown box. 9. Type in the Name: field, Date 1. 10. Type in the Display title: field, Start date. 11. Click the Add button. 12. For the elements listed in the below repeat steps 8 to 11.

138 of 439

13. The following figure shows the event element types.

14. Click the OK button to save your changes and return to the authoring template. 15. From the Site area selection options:, choose Selected site areas. 16. Using the Add button locate and select the /Riverbend/Riverbend/Home/Community/Events site area for all content created with this authoring template to be stored within. 17. From the Form properties section:, choose Collapsible sections for the Content form layout: option. 18. Select the Default Content Properties tab 19. Open the Workflow section, tick the checkbox to Disable workflow, and Hide Section. 20. Click the Save and Close button. Using the steps outlined above for the event authoring template, use the criteria in the next sections to create the remaining templates. Article Element type Name Display title Rich Text Body Body Image Image Image File Resource File File Link Related Link 1 Related Link 1 Link Related Link 2 Related Link 2 Link Related Link 3 Related Link 3 Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden

139 of 439

Essential Link Element type Name Display title Link Link Link Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden General Element type Name Display title Rich Text rtf_Body Body Image img_Image Image Link link_Link Link Component Reference cmpt_Navigator Navigator Component Reference cmpt_Menu Menu Default Content Properties: Content form layout = Collapsible Sections Workflow = Riverbend/Approval Landing Page Element type Name Display title Rich Text Body Body Component Reference Post Body Component Post Body Component Component Reference Auxiliary Component Auxiliary Component Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden Locations Element type Name Display title Text txt_Summary Summary Rich Text rtf_Body Body Image img_Image Image Short Text shtxt_TheStoreTeam TheStoreTeam Option Selection sel_Country Country Item Properties: Selected Site Areas = /Riverbend/Riverbend/Home/About Us/Locations Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden News Element type Name Display title Rich Text Details Details Image ImageLg Large Image Image ImageTn Small Image Component Reference Related Related Collateral Item Properties: Selected Site Areas = /Riverbend/Riverbend/Home/Community/News

140 of 439

Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden Products Element type Name Display title Rich Text Details Details Image ImageLg Large Image Image ImageTn Small Image Component Reference Complimentary Complimentary Items Component Reference Related Related Products Item Properties: Selected Site Areas = /Riverbend/Riverbend/Home/Products/Coffee, /Riverbend/Riverbend/Home/Products/Tea, and /Riverbend/Riverbend/Home/Products/Food Choose saving option for the content author = Allow under multiple site areas Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden Vacancy Element type Name Display title Option Selection Store Store Option Selection Location Location Rich Text Details Details Short Text Contact 1 Contact Name Short Text Contact 2 Contact Phone Short Text Contact 3 Contact Email Item Properties: Selected Site Areas = /Riverbend/Riverbend/Home/About Us/Careers Default Content Properties: Content form layout = Collapsible Sections Workflow = Disabled, Hidden

Recipe authoring templates


The recipe authoring template takes advantage of using the resource template type, instead of the content template type. Typically content type templates are used to capture information using multiple fields and displayed to the visitor as required via the WCM Tag library. The resource template uses a single file resource element to capture a document or file for directly display. To create the receipe authoring template: 1. 2. 3. 4. Click the New button, and select Authoring Template. Type in the Name: field, Recipe. Type in the Display title: field, Recipe. Type in the Description: field, Authoring template for Recipe downloads.

141 of 439

5. 6. 7. 8.
9.

Click on More Actions > Manage Elements button. Select File Resource from the Element type: dropdown box. Type in the Name: field, Recipe. Type in the Display title: field, PDF Recipe. Click the Add button. The following figure shows adding of a file resource element.

10. Click the OK button to save your changes and return to the authoring template.

You will notice that the within the Item Properties section of the authoring template the template type is now selectable; choose Resource as the type from the dropdown box. In addition select Recipe as the File resource Element to use.

Figure 4 - Template type

142 of 439

11. From the Site area selection options:, choose Selected site areas. 12. Using the Add button locate and select the /Riverbend/Riverbend/Recipes/ site area for all content created with this authoring template to be stored within. 13. Select the Default Content tab. 14. Click on the field properties icon for the PDF Recipe. 15. Type in the Maximum bytes: size, 153600 (150kb) 16. Type in the Help text: Browse and upload a Recipe in Adobe PDF format. The following figure shows the properties of the file field resource.

17. Select the Default Content Properties tab. 18. Open the Workflow section, tick the checkboxes to Disable workflow and Hide Section. See figure below.

19. Click the Save and Close button.

143 of 439

3.2.7. Creating the components


This section provides steps to create various IBM Web Content Manager (WCM) components used in the River Bend site.

Creating the image components


This section provides steps to create and reference image components used in the River Bend site. To create and reference image components, you need to: 1. Create the image library components. 2. Reference these image components, as needed, in a presentation template and a content item. For the River Bend site, we use an image logo specially for River Bend. For your implementation, you can use a style sheet that reflects your company's corporate design.

Creating the image library components


Follow these steps to add the image library components: 1. 2. 3. 4. 5. 6. 7. 8. 9. Select New > Component > Image > Site Images. In the name field, enter rbBanner. In the display name , enter Riverbend site banner. In the Image Element Section, click Browse. Browse for the rb_banner_940x180.png image in the location where you downloaded it. Click Open, and then click OK. Click Save , and then click Save and Close. The image is saved in the library of image components. Expand Component > Site Images in the items view navigator to see the new image component that is listed in the index. Repeat steps 1 through 7 to create the other image components as follows: rbLogoBig (uses rbLogoBig.png) rbLogo (uses rbLogo1.png) FILE_bg_main946white (uses FILE_bg_main946white.png) BrownSeperator (uses seperator_490.gif)

Note: You can download the sample images listed below from the Additional Resources Page.

144 of 439

The following image shows the RiverBend site banner used in the home page of the River Ben website.

Creating the authoring tool component


The authoring tool component is used to add authoring portlet functions to web pages. This section provides the steps to create the authoring tool component in the River Bend site. For the River Bend site, we create an authoring tool to edit the content and create new one: 1. 2. 3. 4. Create a new content item. Perform inline editing of a content item displayed in a web page. Delete the content item displayed in a web page. Approve or reject the current content being previewed. These buttons are only visible to approvers when previewing a draft item, or by opening the URL sent by a workflow email action.

145 of 439

Creating the authoring tool


To create the authoring tool: 1. Click New > Component > Authoring Tools. 2. In the Name field, enter AUTH-EditCreateDeleteApprove. 3. In the New action design, add the following: <a href="[Placeholder tag="href"]" > [Placeholder tag="name"]</a>

4. In the Read action properties section:

<a href="[Placeholder tag="href"]" > [Placeholder tag="name"]</a>

5. In the Edit action properties section:

<a href="[Placeholder tag="href"]" > [Placeholder tag="name"]</a>

146 of 439

6. In the Delete action properties section:

<a href="[Placeholder tag="href"]" > [Placeholder tag="name"]</a>

7. In the Approve action properties section: <a href="[Placeholder tag="href"]" > [Placeholder tag="name"]</a>

8. In the Reject action properties section: <a href="[Placeholder tag="href"]" > [Placeholder tag="name"]</a>

9. In the Header properties section: <div><span>

10. In the Separator properties section:

</span><span>

11. In the Footer properties section: </span></div> 12. Click Save, and then click Save and Close. 13. In the menu Menu - Current Area Items, add a reference to the authoring tool to show the buttons for the admins in the menu. 14. In the Design for each menu search result field, reference the authoring template by adding the following after the existing text showing the item details. [Component name="riverbend/auth-editcreatedeleteapprove" compute="always"]

147 of 439

The following image displays the menu component showing the authoring tool in each item.

Creating the navigator component


The navigator component provides a mechanism that allows users to move around the site. A navigator uses the site framework to create links to different site areas or documents in the site automatically. Because it is based on the site framework, the navigator displays the hierarchy of the information architecture. In this section, we provide steps on how to build the navigator component for the River Bend site. Key steps involved are: 1. Create the navigator component. 2. Format the navigator component.

Creating the navigator component


For the River Bend site, we create a site map navigator that will be accessible from all the different pages in the website. The navigator component will display the River Bend site areas. To display the navigator component, add it to the presentation templates of pages below

148 of 439

the home page. To display the navigator, the component reference is added to the three presentation templates. To add the site map navigator component, you need to do the following: 1. Create the site map navigator component. 2. Reference the site map navigator component in the presentation template. 3. Format the site map navigator component by creating bold and normal HTML components. 4. Reference the HTML formatting components in the site map navigator component. Following are the steps for creating the site map component: 1. Click New > Component > Navigator. 2. In the Name field, enter NAV-siteMap. Tips: It is good style and helpful to use a naming schema for components. It makes references easier to understand. For navigators, use a nav- prefix. A reference then reads: <Element name="NAV-siteMap"/>

3. In the display title, enter Site Map Navigator or NAV-siteMap. 4. In the Description field enter: Navigator for accessing site area sections as a site map 5. In the Navigator Component section in the Start Type list, choose Selected. This action defines the site area where the search begins. 6. In the Selected Start Area section, choose Select Start Area. 7. In the index, click River Bend and then click click OK. 8. De-select Include Start so that River Bend does not appear in the navigator. 9. From the Descendant Level list, select 1 Level. This action defines that the first level of children site areas of River Bend are collected. 10. De-select Show Content. If this option is selected, links to content in the current site area display in the navigator. 11. Select Expand current navigator branch one level. If this option is selected, the navigator expands to display the children site areas of the current site area. 12. Select Expand navigator to display current site area . 13. In the Header field, enter the following code: <div id="leftNav">

14. In the Footer field, enter the following code:

</div>

149 of 439

15. Indent each site area level and create a placeholder for the code you will add to format the site area links. In the Navigator result design 1 field, enter the following code: <IndentCmpnt offset="0" repeat="&nbsp;&nbsp;&nbsp;"/> <placeholder tag="namelink"/><br>

16. Click Save and then Close or click Save and Close.

Formatting the navigator


To format the navigator so that the current site area is formatted differently from the rest of the site areas in the navigator, you need to: 1. Create HTML components to specify bold and plain formatting. 2. Reference the bold and plain HTML formatting components in the left navigator component.

Creating HTML components to specify formatting


Follow these steps to create the bold and plain formatting components: 1. Click New > Component > Html. 2. In the Name field, enter HTML-Layout-Main Nav Bold. 3. In the Description field, enter: This is the bold text formatting component. 4. Under HTML Element in the HTML Markup field enter the following lines of code: <a href='<placeholder tag="href"/>'> <b><placeholder tag="name"/></b> </a><br> Attention: Be sure to use single () and double () quotation marks correctly. 5. Click Save and then click Save and Close. Repeat steps 1 through 5 to create a new HTML component with the following changes: In the Name field, enter HTML-Layout-Main Nav Plain. In the Description field, enter the following: This is the plain text formatting component. Under HTML Element in the HTML Markup field, enter the following: <placeholder tag="namelink"/></br>

150 of 439

Attention: Be sure to use single () and double () quotation marks correctly.

Referencing the HTML formatting components in the left navigator component


To specify the format for bold and plain and to indent each level in the site navigation, do the following: 1. 2. 3. 4. 5. 6. In the library explorer, choose Riverbend if it isn't selected. Expand Components. Search for nav-siteMap or Site Map Navigator as its display name. Click Edit. In the Navigator Component section, scroll to the Navigator result design 1 field. Delete the existing placeholder tag in the field, and enter the following line of code:

[IndentCmpnt offset="0" repeat="&nbsp;&nbsp;&nbsp;"] [AlternateDesign normal="riverbend/html-layout-main nav plain" highlight="riverbend/html-layout-main nav bold" type="Any"]<br> 7. Click Save and then Close or click Save and Close. Reference the navigator created from the portlet configuration of the Site Map page as follows:

151 of 439

Following is an image of the site map navigator after being referenced from a portlet in the Site Map page:

Also used in the footer of the theme in the Home page:

Creating the menu component


A menu is ultimately a search mechanism that groups together related documents based on specific criteria such as categories, keywords, authoring templates, site areas, and so forth. In this section, we provide the steps to create the menu component for the River Bend site. There are two methods of creating the menu component: Creating menu component using authoring template Creating menu component using authoring template and site area

152 of 439

Creating menu component using authoring template


For the River Bend website, we create a menu that uses the authoring template as search criteria. It allows users to find content throughout the website independently of a site area. The menu that you create in this section appears on the home page displaying the 4 main site areas using images from the site areas as links. This content page displays content that has authoring template General assigned, but may be linked to any site area. To create the menu component, follow these steps: 1. Click New > Component > Menu. 2. In the Name field, enter Menu-HomePage. 3. In the Menu Criteria section, under Select the criteria to use when searching for content: choose Authoring Templates. 4. In the Authoring Template section, click on Add Authoring Templates and choose AT_General. 5. Click OK. 6. In the Menu design properties, leave the default options. 7. In the Design for each menu search result add the following: <a href="<Placeholder tag="href"/>"> <Element context="autoFill" type="content" key="Image"/></a> Hints: This is referencing the component stored in the Image field of the content items. To preview the menu, create the content first.

Creating menu component using authoring template and site area


In the following steps, we show you how to create a similar menu but selecting both the site area and the authoring template. We could implement it with the site area only, but since we have other content (ex. Default content) that we don't want to appear in the menu, we want to add the authoring template as a search parameter as well. This menu will be displayed when clicking on the "Locations" from the tab About us. The page will first display the default content of the site area followed by the menu. Refer to below figure showing a part of the "locations" page.

153 of 439

To create a menu using authoring template and site area as search criteria, follow these steps: 1. 2. 3. 4. 5. 6. 7. 8. Click New and choose Component Menu. In the name field, enter Menu-Locations. In the Menu Element Query, choose Authoring Templates , and Site Areas. In the Authoring template section, Click on Add Authoring Template. Choose Locations and click OK. In the Site Areas section, click on Add Site Areas. Navigate to Locations by clicking on Home > About Us > Locations. Expand Further Options and select Current content. Add the following html to the header:

<table> <tr><td> Store Locations: </td></tr>

154 of 439

9. Add the following html to the Design for each menu search result:

1: 2: <tr><td> 3: <b>[Property context="autofill" type="content" field="title"] </b> 4: </td></tr> 5: <tr><td> 6: [Element context="autofill" type="content" key="txt_Summary"] 7: [Element context="autofill" type="content" key="rtf_Body"] 8: [Element context="autofill" type="content" key="img_Image"] 9: [Element context="autofill" type="content" key="shtxt_TheStoreTeam"] 10: [Element context="autofill" type="content" key="sel_Country"] 11: </td></tr>

10. Close the table using the following html in the footer: 1: </table>

11. In the Separator, you can either reference an image which represents a line to separate the result or add a dotted line which could be changed later.

To add an image not already created as an image component, do the following steps: 1. 2. 3. 4. In the separator section, click on Insert an Image. Click on Browse and navigate to the image seperator_490.gif. Select the option Add image to library and grant all users access and click OK. Click Save and Close.

To see the image that has been added to the library, click on Component > Image. You will find a new image component added with the file name seperator_490.gif. Repeat steps 1 through 21 to create the following menu components: Menu Name (Menu Criteria) Authoring Template Site Area Other options

Menu Current Area Items

Exclude current content from results Location = Further Options > Current Content Display Order = Decending Results Primary Sort

155 of 439

Key = Publish Date Menu Featured Content /Riverbend/Riverbend/Hom e/Our Community Categories = /Riverbend/Riverbend/ Featured (include descendants) Display Order = Decending Results Primary Sort Key = Publish Date Display Order = Decending Results Primary Sort Key = Publish Date Exclude current content from results Display Order = Ascending Results Primary Sort Key = Publish Date Company/Careers with us News News News/Promotions News/Corporate Information

Menu Latest Events

/Riverbend/Riverbend/Hom e/Our Community/Events

Menu Recipes

Recipe

Menu Careers Menu Offers Menu Corporate Information

Menu - Offers
The Design for the menu would be as follows (no header or footer):

1: 2: 3: 4: 5: 6:

<!-- Design Results --> <tr> <td> <a href="<Placeholder tag="href"/>"> <Placeholder tag="name"/></a><br> </td> </tr>

156 of 439

Menu - Recipes
The Header, Design and Footer for the menu would be as follows:

1: 2: <!-- Header --> 3: <div class="contentIndex"> 4: <div class="body"> 5: <h1>Recipes</h1> 6: <ul class="list"> 7: 8: <!-- Design Result --> 9: <li class="contentEditContainer item"> 10: <div class="itemDetails"> 11: <h3 class="itemTitle"> 12: [Component name="riverbend/site images/downloadicon"] <a href="[Element context="autofill" type="content" key="Recipie"]">[Property context="autofill" type="content" field="title"]</a> 13: </h3> 14: <div class="itemSummary"> 15: [Property context="autofill" type="content" field="description"] 16: </div> 17: </div> 18: <div class="contentClear"></div> 19: </li>

1: 2: 3: 4: 5:

<!-- Footer --> </ul> </div> </div>

Menu - Latest events


The Header, Design and Footer for the menu would be as follows:

1: 2: 3: 4: 5: 6:

<!-- Header --> <div class="contentIndex"> <div class="body"> <ul class="list"> <li class="contentEditContainer item first"></li>

157 of 439

1: 2: <!-- Design Result --> 3: <li class="contentEditContainer item"> 4: <div class="itemImage"> 5: [Element context="autofill" type="content" key="ImageTn"] 6: </div> 7: <div class="itemDetails"> 8: <h3 class="itemTitle"> 9: <a href="[URLCmpnt context="autofill" type="content" mode="current"]">[Property context="autofill" type="content" field="title"]</a> 10: </h3> 11: <span class="itemSubTitle"> 12: [Element context="autofill" type="content" key="Date 1" format="DATE_LONG"] - [Element context="autofill" type="content" key="Location"] 13: </span> 14: <div class="itemSummary"> 15: [Property context="autofill" type="content" field="description"] 16: </div> 17: <div class="itemLink"> 18: [Component name="riverbend/html - read more link"] 19: </div> 20: </div> 21: <div class="contentClear"></div> 22: </li>

1: 2: 3: 4: 5:

<!-- Footer --> </ul> </div> </div>

Menu - Featured content


The Header, Design and Footer for the menu would be as follows:

1: 2: 3: 4: 5: 6:

<!-- Header--> <div class="contentIndex"> <div class="body"> <ul class="list"> <li class="contentEditContainer item first"></li>

158 of 439

1: 2: <!-- Design Results--> 3: <li class="contentEditContainer item"> 4: <div class="itemImage"> 5: [Element context="autofill" type="content" key="ImageTn"] 6: </div> 7: <div class="itemDetails"> 8: <h3 class="itemTitle"> 9: [Property context="autofill" type="content" field="title"] 10: </h3> 11: <div class="itemSummary"> 12: [Property context="autofill" type="content" field="description"] 13: </div> 14: <div class="itemLink"> 15: [Component name="riverbend/html - read more link"] 16: </div> 17: </div> 18: <div class="contentClear"></div> 19: </li>

1: 2: 3: 4: 5:

<!-- Footer--> </ul> </div> </div>

Menu - Current area items


The Header, Design and Footer for the menu would be as follows:

1: 2: 3: 4: 5: 6:

<!-- Header --> <div class="contentIndex"> <div class="body"> <h1>Products</h1> <ul class="list">

159 of 439

1: 2: <!-- Design Result --> 3: <li class="contentEditContainer item"> 4: <div class="itemImage"> 5: [Element context="autofill" type="content" key="ImageTn"] 6: </div> 7: <div class="itemDetails"> 8: <h3 class="itemTitle"> 9: <a href="[URLCmpnt context="autofill" type="content" mode="current"]">[Property context="autofill" type="content" field="title"]</a> 10: </h3> 11: <div class="itemSummary"> 12: [Property context="autofill" type="content" field="description"] 13: </div> 14: <div class="itemLink"> 15: [Component name="riverbend/html - read more link"] 16: [Component name="riverbend/autheditcreatedeleteapprove" compute="always"] 17: </div> 18: </div> 19: <div class="contentClear"></div> 20: </li> 1: 2: <!-- Footer and Paging --> 3: <div class="foot"> 4: <div class="pagingBar"> 5: [Component name="riverbend/pn_pagenavigator"] 6: </div> 7: </div> 8: </ul> 9: </div> 10: </div>

Creating the personalization component


Personalization means selecting content based on personalization rules that are specified according to a user or any other element that is changeable. This section provides the steps to create the personalization component for the River Bend site. For more information about personalization including the different components involved and where to find them, refer to:
3.4 Personalizing your site

For the River Bend website example, we personalize an image on the home page. This image changes automatically based on the current season. There are currently two images, a winter image and a summer image. The winter image showing on the

160 of 439

homepage can be seen in the figure below.

Using personalization rules, the current seasons beverage will be selected and the image from the content will be displayed. When creating the personalization component, the following key steps are involved: 1. 2. 3. 4. Create select action rules. Create profiler rule. Create binding rule. Create Personalization Component.

Creating a selection personalization rule


To create a personalization rule, write a select rule that retrieves all the content that has the category as Summer:
1.

Navigate to the Personalization page from the Content tab as shown in the below image and choose Business Rules from the drop down menu.

161 of 439

2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

Select New and choose Rule. Enter SummerDrinkRule in the Rule name. Choose Select Action if not already selected. Click on content* and change it to be Web Content. Click on Attribute and change it to be Category. Choose is exactly instead of "is associated with". Click on value*, click on Select category. Navigate to the category Products > Beverages > SeasonDrink > Summer. Click OK and click Save. Repeat steps 2 through 11 to create the Winter Selection Rule. The rule name is WinterDrinkRule and Category is Winter.

The rule should look like the following figure.

Creating a profiler personalization rule


Now we create the profiler rule that sets the present season according to the current month. To create the profiler personalization rule, follow these steps: Select New and choose Rule. Enter SeasonsProfilerRule in the Rule name. Choose Profiler. Click on Profile* and type Winter. Click Submit. Click on attribute* and change it to be Date > Month. Click on it and make it is between. Add January in the first value and March the second value. Click on add Condition and repeat steps 6-8 with the values October and December. 10. Click on add Profile and type Summer. 11. Repeat steps 6-8 with values April and September. 1. 2. 3. 4. 5. 6. 7. 8. 9.

162 of 439

12. Click Save.

Creating a binding rule


Now, we create the binding rule that binds together the action rules with the profiler rule. The binding rule first runs the profiler rule, and according to the profile selected, fires the appropriate action selector rule. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Select New and choose Rule. Enter SeasonsBindingRule in the Rule name. Choose Binding. Click on Profiler*. Click on Select Profiler and choose SeasonsProfilerRule. Click OK. Click on Profile and choose Summer. Click on DoAction and choose Action > SummerDrinkRule. Click on Profile and choose Winter. Click on DoAction and choose Action > WinterDrinkRule. Click Save.

Refer to the figure below for the binding rule.

If content already exists that matches the categories, we can view the content as shown in the figure below by clicking on Preview.

163 of 439

A no content screen will be shown until content exists with those categories.

Creating personalization component


To display the result that was filtered based on the season, we create a personalization component. The personalization component is similar to a menu component. We choose the starting point of our rules, in our case it is the SeasonsBindingRule and specify how the results are displayed. For this example, we will show the image of the content on the home page. Follow those steps to create the personalization component: Navigate back to Web Content Management tab. Click New and choose Component > Personalization. In the name field enter Pers-Seasons. In the Personalization Element section, click on Search. Choose SeasonsBindingRule. Click OK. Note: You can create a new rule by clicking on the New* button if it is a single, simple rule. 7. Add the following html in the design for each search result: 1. 2. 3. 4. 5. 6.

164 of 439

<a href="[Placeholder tag="href"] "> [Element context="autofill" type="content" key="ImageLg"]</a>

8. Click Save and then click Save and Close. Add a reference to the personalization component from the html component HTML Seasonal Product. The html used for that is as follows: 1: 2: 3: 4: 5: 6: 7:

<div class="contentSlideshow"> <div class="head"> <h2 class="blockHeading">Seasonal Product</h2> </div> [Component name="riverbend/pers-seasons"] </div>

Creating the page navigation component


A page navigation component provides navigation controls that are used to navigate through a set of results generated by menus, navigators and search elements only. To use a page navigation element, you must create a page navigation component. Page navigation elements cannot be added to authoring templates, sites, site areas, or content items. A page navigation component can generate two kinds of page navigation controls: Shuttle controls provide navigation relative to the current page. This includes sequential linking to the previous or next page of results and quick linking to the first and last pages in the set. Paging controls provide navigation according to the page number of the result set. A list of page number links is displayed, along with a continuation link for access to the previous or next set of page numbers, if all page numbers are not displayed.

The section provides the steps to build the page navigation component for the River Bend site. When creating the component, there are two key steps involved: 1. Create the page navigation component. 2. Reference the page navigation component from within the menu components.

165 of 439

Creating the page navigator


To create page navigator: 1. Click New > Component > Page Navigation. 2. In the name field, enter PN_pageNavigator. 3. In Page Navigation Element section, choose the following: - Shuttle (first, previous, next, and last controls) - Paging (page numbering and continuation) 4. In the header, enter the following html: <span>

5. In the Separator, enter the following: | </span><span>

6. In the footer, enter the following: 1: 2: </span> 3: <span> 4: Page [PageInfo value="currentPage" ] 5: [PageInfo value="unknownPages" knowntext="of" unknowntext="of at least" ] 6: [PageInfo value="totalPages" ]. 7: </span> 8: </table>

7.

For the rest of the values leave the default values, as shown in the following image:

166 of 439

8. Click Save, and then click Save and Close.

Reference the page navigation component in menu components


To reference the page navigation component in menu components, follow these steps: 1. 2. 3. 4. In the items view navigator, click on Components. Filter by name to choose Menu - Current Area Items. Click Edit. In the Menu design properties section, change the value in Results per page to 3. Note: This is done for illustrative purposes, in order to have many pages to navigate to. 5. In the footer field, enter the following html before the closing of the table: 1: 2: 3: 4:

<tr><td> <Component name="PN_pageNavigator"/> </td></tr>

6. Click Save and Close.

167 of 439

The following figure shows the resulting page navigation component displayed on the product page.

Creating an image slide show menu


To add functionality to the rendered IBM Web Content Manager site, you can use some advanced techniques offered by WCM. This section describes the process of creating a dojo image slide show on the home page. The images in the sldie show acts as a gateway to the content. For this example, we cover the following topics: Storing JSP in custom application and referencing from WCM JSP component Using WCM component design to drive data to dojo components Implementing a simple custom cache solution for individual item

168 of 439

DISCLAIMER OF WARRANTIES: The accompanying code provided in this section (and this wiki) is sample code, created by the authors of this wiki. This sample code is not part of any standard or IBM product and is provided to you solely for the purpose of assisting you in the development of your website. The code is provided as is, without warranty of any kind. IBM shall not be liable for any damages arising out of your use of the sample code, even if they have been advised of the possibility of such damages.

Creating the WCM Menu


For this functionality, we use a WCM menu to generate links to key products. We then use a dojo asset to render those links.

Dojo and WCM components


Given its extensibility and its tight integration within portal themes, dojo is a strong javascript framework to use for presenting WCM information to your end users. See the dojo documentation for examples of what is possible.

For the River Bend site, we use a dojox.image.SlideShow to render a slide show of images. These images come from some of the key products of the sample site. When the image is clicked, content opens.

The WCM menu


In the River Bend site, we have provided some links to some key products by linking them under a site area /Riverbend/Riverbend/Key Products:

Menu selection criteria


What we need to do is provide a menu that returns references to these link items. Here are the menu parameters for this menu, named MENU - KeyProductsImageRotator within the repository:

169 of 439

Note that we have configured the menu to pull content based on a specific site area, the /Riverbend/Riverbend/Key Products site area. We have configured it to return a maximum of 10 results, and we have no need for sorting. We only want to include 1 page, and no need for read ahead.

170 of 439

Menu header
In the menu header, we set up the component to be able to use the dojo assets:

1: 2: 3: 4: 5: 6:

<script type="text/javascript"> dojo.require("dojo.data.ItemFileReadStore"); dojo.require("dojox.image.SlideShow"); dojo.require("dojo.parser"); var imagestore = new dojo.data.ItemFileReadStore({data:{items:[

We do not describe how dojo works in this section, but the important piece is where we open the ItemFileReadStore. We leave it open ended so that in each menu match design, we can add in the relevant information for that particular match.

Design for each menu result


In the design for each menu result, we have the following:

1: 2: {"linkAttr":"[Placeholder tag="href"]", "imageLargeAttr":"[Element context="autofill" type="content" key="ImageLg" format="URL"]","titleAttr":"[Placeholder tag="title"]"}

In summary, what this does is add the relevant information about each match to the javascript object that will drive the dojo ImageSlider component. We add in the image, the URL to the content, and the title of the content.

Menu separator
For the menu separator, we only need to include a comma: 1: 2:

Menu footer
In the menu footer, we close off the ItemFileReadStore object now that each item has been placed in. Also, we add the code to display the dojo asset to the page.

171 of 439

1: 2: <script> 3: dojo.addOnLoad(function() { 4: dojo.parser.parse(); 5: //Call the setDataStore function, passing it the data store, the request object, 6: //and the name map. 7: dijit.byId('slideshow1').setDataStore(imagestore, 8: { query: {}, count:20 }, 9: { 10: imageLargeAttr: "imageLargeAttr", linkAttr: "linkAttr", titleAttr: "titleAttr" 11: } 12: ); 13: }); 14: </script> 15: 16: <div dojoType="dojox.image.SlideShow" id="slideshow1" > </div>

What we have done here is to drop the dojox.image.SlideShow to the page in the div tags. This is where dojo renders the image slide show when it is complete. The rest of the javascript tells that slide show to use the data that will be coming from the menu. For the dojo, it will be included with the out of the box themes. If you wish to use with a custom theme, you have to ensure dojo is available.

Creating the custom application


After creating the WCM menu, we need to add the custom caching layer to the solution. To add the custom caching layer: 1. Develop the custom cache code. 2. Create the .jsp to render the WCM menu and cache the results.

To create these assets, we need to create a custom web application.

Creating the application


For this example, we use Rational Application Developer Version 8 (RAD). Yu can use any tools you wish, depending on your familiarity with the tool. To create the application: 1. In RAD, select New > Dynamic Web Project. 2. In the dialog that comes up, name the project RiverbendCustom. 3. Keep the defaults. Also ensure that Add project to an EAR is selected. The wizard will create the EAR project for you. 4. Click on Finish.

172 of 439

Creating the custom code package


We will create some custom code for the caching piece, so we need to create a package to hold this code. To create the customer code package:
1.

From within the RiverbenCustom application, right click on RiverbendCustom/Java Resources/src and select New -> Nackage.

173 of 439

2.

In the dialog, name the package com.ibm.riverbend.simplecache, then click finish.

Creating the custom classes


We need 2 custom classes for the cache: SimpleCacheObject - Used to hold the cached information and an expiration time impleCacheImpl - Used to get and set the cache entries.

174 of 439

Creating the SimpleCacheObject class


To create the SimpleCacheObject:
1.

Right click on the package, and create a new class by select New > Class.

2.

Name the new class SimpleCacheObject. Ensure it is in the correct package. Click Finish.

175 of 439

3. In the class, paste the following code.

1: 2: package com.ibm.riverbend.simplecache; 3: import java.util.logging.Logger; 4: 5: /** 6: * 7: * SimpleCacheObject a wrapper for a simple cache entry 8: */ 9: public class SimpleCacheObject 10: { 11: /** 12: * Logger for the class 13: */ 14: private static final Logger s_log = Logger.getLogger(SimpleCacheObject.class.getName()); 15: 16: /** 17: * the object in the cache 18: */ 19: private Object cacheEntry; 20: 21: /** 22: * the expiration time 23: */ 24: private long cacheExpireTime; 25: 26: /** 27: * 28: * Constructor 29: * 30: * @param objectToCache the object to cache 31: * @param cacheExpire the time to cache it for 32: */ 33: SimpleCacheObject(Object objectToCache, long cacheExpire) 34: { 35: cacheEntry = objectToCache; 36: cacheExpireTime = cacheExpire; 37: } 38: 39: /** 40: * 41: * getCacheEntry returns the object stored in the cache 42: * 43: * @return the cached object 44: */ 45: public Object getCacheEntry() 46: { 47: return cacheEntry; 48: } 49: 50: /**

176 of 439

51: * 52: * setCacheEntry sets the item to store in the cache 53: * 54: * @param p_cacheEntry the item to cache 55: */ 56: public void setCacheEntry(Object p_cacheEntry) 57: { 58: cacheEntry = p_cacheEntry; 59: } 60: 61: /** 62: * 63: * getCacheExpireTime returns the cache expiration 64: * 65: * @return the cache expiration 66: */ 67: public long getCacheExpireTime() 68: { 69: return cacheExpireTime; 70: } 71: 72: /** 73: * 74: * setCacheExpireTime sets the cache expiration time 75: * 76: * @param p_cacheExpireTime the time to set as cache expiration time 77: */ 78: public void setCacheExpireTime(int p_cacheExpireTime) 79: { 80: cacheExpireTime = p_cacheExpireTime; 81: } 82: 83: /** 84: * override toString 85: */ 86: public String toString() 87: { 88: String returnString = ""; 89: returnString = "SimpleCacheObject cached::"+cacheEntry+":: expireTime::"+cacheExpireTime; 90: return returnString; 91: } 92: } 93:

177 of 439

At a high level, the object is a wrapper around another object. We use the wrapper so that we can also associate an expiration time with it.

Creating the SimpleCacheImpl class


The SimpleCacheImpl acts as the gateway into the cache. We describe how we use it in the section on the custom JSP's, but for now know that this is where we get and set cache entries. To create the SimpleCacheImpl: 1. Right click on the package, and create a new class by select New > Class. 2. Name the new class SimpleCacheImpl. Ensure it is in the correct package. Click Finish.

178 of 439

3. In the class, paste the following code:

1: 2: package com.ibm.riverbend.simplecache; 3: 4: import java.util.HashMap; 5: import java.util.Map; 6: import java.util.logging.Level; 7: import java.util.logging.Logger; 8: 9: /** 10: * 11: * SimpleCacheImpl a Simple cache 12: */ 13: public class SimpleCacheImpl 14: { 15: private static final Logger s_log = Logger.getLogger(SimpleCacheObject.class.getName()); 16: private static long defaultExpirationMinutes = 30; 17: private static SimpleCacheImpl s_theCacheImpl; 18: 19: private static Map<String, SimpleCacheObject> s_simpleCacheEntries = new HashMap<String, SimpleCacheObject>(); 20: 21: /** 22: * 23: * get retrieve the cache object from the cache 24: * Will return null if the item is expired, and will remove the 25: * item from the cache if its expired 26: * 27: * @param keyValue the key of the item to retrieve 28: * @return 29: */ 30: public SimpleCacheObject get(String keyValue) 31: { 32: SimpleCacheObject returnObject = null; 33: returnObject = s_simpleCacheEntries.get(keyValue); 34: // return null if its expired 35: if(returnObject != null && isExpired(returnObject)) 36: { 37: remove(keyValue); 38: returnObject = null; 39: } 40: if(s_log.isLoggable(Level.FINEST)) 41: { 42: s_log.log(Level.FINEST, "get called with key "+keyValue); 43: if(returnObject != null) 44: { 45: s_log.log(Level.FINEST,"get returning

179 of 439

"+returnObject); 46: } 47: else 48: { 49: s_log.log(Level.FINEST, "returning null"); 50: } 51: 52: } 53: return returnObject; 54: } 55: 56: /** 57: * 58: * remove remove the cache entry based on the key 59: * 60: * @param keyValue the key for the cache entry to be removed. 61: */ 62: public void remove(String keyValue) 63: { 64: s_simpleCacheEntries.remove(keyValue); 65: } 66: 67: /** 68: * 69: * put add an item to the cache 70: * 71: * @param keyValue the key value for the cache item 72: * @param cacheObject the object to add to the cache 73: */ 74: public void put(String keyValue, Object cacheObject) 75: { 76: long expireTime = System.currentTimeMillis()+defaultExpirationMinutes * 60 * 1000; 77: put(keyValue, cacheObject, expireTime); 78: } 79: 80: /** 81: * 82: * put add an item to the cache 83: * 84: * @param keyValue the key value for the cache item 85: * @param cacheObject the object to add to the cache 86: * @param expireTime the expiration of the object 87: */ 88: public void put(String keyValue, Object cacheObject, long expireTime) 89: { 90: SimpleCacheObject cachedObject = new SimpleCacheObject(cacheObject, expireTime); 91: s_simpleCacheEntries.put(keyValue, cachedObject); 92: if(s_log.isLoggable(Level.FINEST)) 93: { 94: s_log.log(Level.FINEST, "put called with key "+keyValue+" cacheObject "+cacheObject+" expireTime "+expireTime); 95: } 96: }
180 of 439

97: 98: /** 99: * 100: * isExpired whether or not the cache item is expired 101: * 102: * @param theObject the cache item to check 103: * @return boolean whether expired 104: */ 105: public boolean isExpired(SimpleCacheObject theObject) 106: { 107: boolean isExpiredReturn = false; 108: if(theObject != null) 109: { 110: isExpiredReturn= System.currentTimeMillis()>theObject.getCacheExpireTime(); 111: } 112: if(s_log.isLoggable(Level.FINEST)) 113: { 114: s_log.log(Level.FINEST, "isExpired "+isExpiredReturn); 115: } 116: return isExpiredReturn; 117: } 118: 119: static public SimpleCacheImpl getInstance() 120: { 121: if(s_theCacheImpl == null) 122: { 123: s_theCacheImpl = new SimpleCacheImpl(); 124: } 125: return s_theCacheImpl; 126: } 127: }

The class allows us to get and set cache entries. One thing to note, we have added a logger to the class. This means we can enable trace in the WebSphere Portal administration to see whether the class is behaving correctly. To do so, enable the following trace, and we will see the trace statements in the trace.log: com.ibm.riverbend.simplecache.*=finest
An example trace statement: [9/28/11 10:59:02:529 PDT] 00000031 SimpleCacheOb 3 isExpired false [9/28/11 10:59:02:529 PDT] 00000031 SimpleCacheOb 3 get called with key ANON_Riverbend_Menu_KeyProductsImageRotator [9/28/11 10:59:02:529 PDT] 00000031 SimpleCacheOb 3 get returning SimpleCacheObject cached::

181 of 439

Creating the custom jsps


Now that the code is in place, we need to create the jsp file that renders the menu and caches the results. Later, we create the WCM component to render this JSP.

Create the folders for the jsp


Before we create the jsp files, we need to create the folders within our application that will house them. To create the folder, within the application in RAD, right click on the WebContent folder, and select New > Folder. Name the folder jsp and click Finish.

Repeat this process to create a folder within the jsp folder named html. When we finished, you have /jsp/html under the WebContent folder in the application. See the screenshot above.

Import the wcm.tld file


Since the jsp files leverage the WCM jsp tags, we have to import the wcm.tld file into the application: 1. Create the directory within the custom application. 2. Within the application in RAD, right click on the WebContent/WEB-INF folder, and select New > Folder.

182 of 439

3.

Name the folder tld and click Finish.

4. After the folder is created, import the wcm.tld file from the 7.0 WebSphere Portal server. You can find the file in /wp_profile/installedApps/cellname/wcm.ear/ilwwcm.war/WEB-INF/tld. 5. Copy the file to a directory on the machine where you use RAD. 6. Right click the tld folder, and select Import.

7. From the wizard, select File System. 8. In the dialog that is presented, select the folder where the .tld file resides. Click OK. 9. In the next dialog, select the wcm.tld file on the right hand side.

183 of 439

10. Click finish. The end result should be that the wcm.tld file now resides within /WEB-INF/tld folder in your project.

Create the renderRotatorMenu.jsp


The renderRotatorMenu.jsp file is responsible for retrieving the WCM menu from the repository, and render it. Additionally, we cache the results in our custom cache. When we render this JSP, we first check the cache to see whether the item is already cached.

184 of 439

To create the jsp file: 1. Right click the html folder, and select new jsp file.

2. Click the Next button. 3. In the dialog, name the file renderRotatorMenu.jsp.

185 of 439

4. Once the jsp is created, replace the entire text of the jsp with the following code.

1: 2: <%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" 3: %><%@ page session="false" contentType="text/html" import="java.util.*, 4: java.util.logging.*, 5: javax.portlet.*, 6: com.ibm.riverbend.simplecache.*, 7: com.ibm.workplace.wcm.api.exceptions.*, 8: com.ibm.workplace.wcm.api.query.*, 9: com.ibm.workplace.wcm.api.*" 10: %> 11: <%! 12: private static final Logger s_log = Logger.getLogger(SimpleCacheObject.class.getName()); 13: 14: %> 15: <!-- grab the dojo assets --> 16: <link rel="stylesheet" href="<%=pageContext.getAttribute("dojoRoot", PageContext.REQUEST_SCOPE)%>/dijit/themes/tundra/tundra.css" type="text/css" /> 17: <link rel="stylesheet" href="<%=pageContext.getAttribute("dojoRoot", PageContext.REQUEST_SCOPE)%>/dojox/image/resources/image.css" type="text/css" /> 18: <wcm:initworkspace/> 19: <% 20: boolean isLoggingFinest = s_log.isLoggable(Level.FINEST); 21: try 22: { 23: Workspace usersWorkspace = (Workspace) pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY); 24: // check cache first 25: SimpleCacheImpl theCache = SimpleCacheImpl.getInstance(); 26: String keyString = "Riverbend_Menu_KeyProductsImageRotator"; 27: // if we are anonymous, use a different key 28: if(request.getUserPrincipal() == null) 29: { 30: keyString = "ANON_Riverbend_Menu_KeyProductsImageRotator"; 31: }

186 of 439

32: 33: SimpleCacheObject theCacheObject = theCache.get(keyString); 34: if(theCacheObject != null) 35: { 36: String cachedString = (String)theCacheObject.getCacheEntry(); 37: out.println(cachedString); 38: } 39: else 40: { 41: // retrieve the workspace and the rendering context 42: // set the library in the workspace 43: usersWorkspace.setCurrentDocumentLibrary(usersWorkspace.getDo cumentLibrary("Riverbend")); 44: RenderingContext usersRC = (RenderingContext) pageContext.getRequest().getAttribute(Workspace.WCM_RENDERINGCONTEXT_ KEY); 45: 46: // get the menu to render it. Use the new QueryAPI 47: QueryService queryService = usersWorkspace.getQueryService(); 48: Query query = queryService.createQuery(LibraryMenuComponent.class); 49: query.addSelector(Selectors.nameLike("MENU KeyProductsImageRotator%")); 50: 51: // execute the query 52: ResultIterator results = queryService.execute(query); 53: if(results.hasNext()) 54: { 55: if(isLoggingFinest) 56: { 57: s_log.log(Level.FINEST, "renderRotatorMenu.jsp :: menu not null"); 58: } 59: 60: LibraryMenuComponent userMenu = (LibraryMenuComponent)results.next(); 61: String renderedHTML = usersWorkspace.render(usersRC,userMenu); 62: out.println(renderedHTML); 63: 64: if(isLoggingFinest) 65: { 66: s_log.log(Level.FINEST, "renderRotatorMenu.jsp :: menu not null"); 67: s_log.log(Level.FINEST, "renderRotatorMenu.jsp :: renderedHTML "+renderedHTML);

187 of 439

68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79:

} // cache it theCache.put(keyString,renderedHTML); } } } catch(Exception e) { e.printStackTrace(); } %>

We do not go into great detail about the jsp. We concentrate on the important bits of the code as follows. Here, we are generating a key to hold the cache entry. Since this is a menu with images, we want to allow anonymous and authenticated requests. In order to handle that, we need a different cache key for anonymous vs authenticated. 1: 2: 3: 4: 5: 6: 7:

String keyString = "Riverbend_Menu_KeyProductsImageRotator"; // if we are anonymous, use a different key if(request.getUserPrincipal() == null) { keyString = "ANON_Riverbend_Menu_KeyProductsImageRotator"; }

Next, we attempt to retrieve the item out of the cache if it exists. If it does, it is rendered directly to the screen. 1: 2: SimpleCacheObject theCacheObject = theCache.get(keyString); 3: if(theCacheObject != null) 4: { 5: String cachedString = (String)theCacheObject.getCacheEntry(); 6: out.println(cachedString); 7: }

188 of 439

Create the removeCacheEntry.jsp


For testing purposes, clear the cache entries since you are making menu changes. This jsp is created for that task. Repeat the above steps to create a new jsp in the same folder, name it removeCacheEntry.jsp. Enter the following code and save it:

1: 2: <%@ page session="true" contentType="text/html" import="java.util.*, 3: java.util.logging.*, 4: javax.portlet.*, 5: com.ibm.riverbend.simplecache.*" 6: %> 7: 8: <% 9: try 10: { 11: // check cache first 12: SimpleCacheImpl theCache = SimpleCacheImpl.getInstance(); 13: String keyString = "Riverbend_Menu_KeyProductsImageRotator"; 14: String keyString2 = "ANON_Riverbend_Menu_KeyProductsImageRotator"; 15: String passedValue = (String)request.getParameter("key"); 16: if(passedValue != null) 17: { 18: keyString = passedValue; 19: } 20: theCache.remove(keyString); 21: theCache.remove(keyString2); 22: out.println("removed "+keyString); 23: 24: } 25: catch(Exception e) 26: { 27: e.printStackTrace(); 28: } 29: %>

The way that the jsp is written, it automatically clears the cache entries for the 2 hard coded keys that we created. If you create your own custom keys, you would pass those values on the URL to the JSP as ?key=keyname.

189 of 439

Exporting the custom application


Now that the application is created, we need to export it from RAD so that we can deploy on the server. To export the custom application:
1.

Right click on the project name within RAD, select Export > WAR file.

2. Choose the location where you want the file to be placed, and call the file RiverbendCustom.war.

Deploying the custom application


Now that you have the .war file, you need to deploy to the portal server.

190 of 439

To deploy the custom application:


1.

Log into the WebSphere Application Server admin console and navigate to Applications > Application Types > WebSphere Enterprise Applications.

2. Click on the Upload button. 3. On the next page in the wizard, keep the Local File System selection active, and choose the RiverbendCustom.war, and then click Next.

4. On the next page, keep Fast Path checked, and click Next. 5. For the Step 1 page, keep the values as they are, and click the Next button. 6. On the Step 2 page, where we map the modules to the servers. In this case, we want to map the custom application to the WebSphere_Portal server. To do that, select the server from the list of clusters and servers, and select the RiverbendCustom module. With the checkbox selected, click on the Apply button. Ensure the server in the mapping for the RiverbendCustom module is the WebSphere_Portal server. Click on the Next button.

191 of 439

7. On the next page, map the context root for the application. In the context root field, enter /RiverbendCustom. Then click the Next button.

8. After you click Next, the summary screen appears. Click on the Finish button to deploy the changes. 9. After the application is deployed, click Save on the next change to persist the changes to the server. Once saved, ensure the application is started: 1. Navigate to Applications > Application Types -> WebSphere Enterprise Applications. 2. On the form, click on the Filter button, then leave name as the filter and type Riverbend*, and click OK.

192 of 439

3. Click the checkbox to select the application, and click the Start button. Now the application will be started.

Creating the remaining WCM Items


Now that the application has been created and deployed, all that remains is to create the WCM JSP components to reference the 2 JSPs we have created. We use one just to clear cache entries during testing, and the other will be used in a WCM rendering portlet to provide the menu to end users.

193 of 439

Creating the JSP - removeCacheEntry.jsp component


First we will create the jsp component to use to clear the cache entries. To create both: 1. In the WCM Authoring portlet, select New > Component > JSP Component.

2. For the name, display title, and description, enter JSP - removeCacheEntry.jsp. 3. For the path, enter /RiverbendCustom;/jsp/html/removeCacheEntry.jsp. 4. Enter the same in the error field.

5. Click Save and Close.

194 of 439

This tells WCM to retrieve the jsp from the custom application in the directory where we placed it.

Creating the JSP - renderRotatorMenu.jsp component


Now we repeat the process for the JSP - renderRotatorMenu.jsp component. Repeat the same steps as above, except: In name, display title, and description, enter JSP - renderRotatorMenu.jsp. In the path and error fields, enter /RiverbendCustom;/jsp/html/renderRotatorMenu.jsp.

Configure the WCM rendering portlet to render the JSP component


Finally, configure the WCM JSR286 portlet to render the jsp component so that the menu is rendered to the screen. Deploy the WCM rendering portlet to a page. Click on the Edit Shared Settings under the configuration options of the portlet. Enter in the following values: Content Type: Component Component: Library Name/JSP - renderRotatorMenu.jsp Content: chose any default content from your library

195 of 439

The only other options to change are the portlet cache options. We want to ensure each user gets their own copy of the portlet cache, and since we are relying on the custom cache, we set the timeout to 1 second.

After the configuration changes, click OK. Finally, render the portlet, and you will see the menu being rendered from the JSP.

Creating the tags and rating widgets


Users can tag or rate portal content and view the tags and ratings. This allows to better organize, categorize, and find portal content, including custom content, if it is available in the portal. For example, users can tag or rate drinks in the River Bend website. In general, all content in a portal that can be uniquely identified can be tagged or rated. Users can apply tags and ratings both publicly and privately for the following purposes: Public tagging and rating helps users categorize, evaluate, and find portal content based on tags and ratings by other users. Private tagging and rating can help users create their own personal way to categorize, evaluate, and find portal content.

196 of 439

The portal provides two user interfaces for tagging and rating The default user interface. It allows users to tag and rate resources, and to view tags and ratings for multiple resources. An alternative user interface that works with inline widgets. This shows tags and ratings for individual resources in the context of each resource.

By default this user interface is available for blogs and wikis. Administrators can also add this user interface to other types of resources. To create and reference tags and ratings, you need to add a reference to the tags or rating widget in the presentation template. This section provides steps to create and reference tags and rating widgets for the River Bend site.

Referencing tags widget


Follow these steps to add tags widget to the presentation template: 1. 2. 3. 4. 5. Click on Libraries and choose Riverbend. Click on Presentation Templates. Choose the presentation template Products. Click on Edit. Add the following snippet to the presentation: <div id="tags">[Plugin:tags]</div>

197 of 439

Presentation template should now look as following: 1: 2: <!-- Products PT --> 3: <div class="contentEditContainer contentDetail"> 4: <div class="head"> 5: <h2 class="itemTitle">[Property context="current" type="content" field="title"]</h2> 6: </div> 7: <div class="body"> 8: <div class="itemSummary"> 9: [Element context="current" type="content" key="ImageLg"] 10: </div> 11: <div class="itemBody"> 12: [Element context="current" type="content" key="Details"] 13: </div> 14: </div> 15: <div class="foot"> 16: <div class="tagging"> 17: <div id="tags">[Plugin:tags]</div> 18: </div> 19: </div> 20: 21: <!-- Component Reference --> 22: [Element context="current" type="content" key="Related"] 23: [Element context="current" type="content" key="Complimentary"] 24: </div>

198 of 439

Following is a figure of a content using the product presentation template showing the tagging widget:

Creating rating widget


To create the rating widget follow these steps: 1. 2. 3. 4. 5. Click on Libraries and choose Riverbend. Click on Presentation Templates. Choose the presentation template Products. Click on Edit. Add the following snippet to the presentation: 1: <div class="rating">Product Rating:[Plugin:ratings]</div>

199 of 439

Presentation template should now look as following: 1: 2: <!-- Products PT --> 3: <div class="contentEditContainer contentDetail"> 4: <div class="head"> 5: <h2 class="itemTitle">[Property context="current" type="content" field="title"]</h2> 6: <div class="rating">Product Rating:[Plugin:ratings]</div> 7: </div> 8: <div class="body"> 9: <div class="itemSummary"> 10: [Element context="current" type="content" key="ImageLg"] 11: </div> 12: <div class="itemBody"> 13: [Element context="current" type="content" key="Details"] 14: </div> 15: </div> 16: <div class="foot"> 17: <div class="tagging"> 18: <div id="tags">[Plugin:tags]</div> 19: </div> 20: </div> 21: 22: <!-- Component Reference --> 23: [Element context="current" type="content" key="Related"] 24: [Element context="current" type="content" key="Complimentary"] 25: </div>

200 of 439

Following is a figure of a content using the product presentation template showing the rating widget and the tagging widget.

3.2.8. Creating the presentation templates


The function of presentation templates is to aggregate and format for display components (HTML, Menus, Images), and elements (items from an authoring template) from the component library and content repository. Presentation templates are used to format and display content items, for example a new Event item or Product from River Bend. In this section, we describe how to create the presentation templates used across the River Bend site. Note: It is not always necessary to use presentation templates to display components and content items from IBM Web Content Manager. Menus, HTML, and Image components can be used independently of presentations templates, providing flexibility to

201 of 439

directly select these components as required. The WCM Web Content Viewer portlet provides options to select components from WCM for display. It also provides an override function to alter the display based upon an alternative presentation template to the one mapped. For the River Bend site, we create the following presentation templates: Landing Page Events Products

We also illustrate how to pair the authoring template and the presentation template.

Creating the Landing presentation template


Using the steps outlined below we create the Landing presentation template. We reference many of the components we have created in the previous sections: 1. 2. 3. 4. 5. 6. 7. From the Library Explorer, click the New button and select Presentation Template. Type in the Name: field, Landing. Type in the Display title: field, Landing. Type in the Description: field, General landing presentation template for main pages. In the Presentation Template Options section paste the following code into the Presentation Markup: area. Select the text in the presentation markup, delete the text and click the Insert a Tag button. Using the Insert a Tag windows that will appear, select: Tag type: Element Source item type: Current Item content: Current Authoring template: Landing Page Click the OK button, and the OK button again to insert the tag.

8.

Landing page code snippet


1: 2: <!-- General lanading presentation template for main pages --> 3: <div class="itemSummary"> 4: <h1>[Property context="current" type="content" field="description"]</h1> 5: <div class="body"></br> 6: <h5><!-- INSERT BODY ELEMENT HERE --></h5> 7: </div> 8: </div> 9: 10: [Element context="current" type="content" key="Post Body Component"]

202 of 439

Review of Landing presentation template


The following image shows one of the portlets on the River Bend home page displaying the default content item using the Landing presentation template.

Note: To reference a component, the tag result from the Insert Tag button will look similar to [Component name=" Name of the component " /]. You will notice that once you have saved your presentation template, component tags when shown in edit mode will also include an ID reference. This ID is to ensure referential integrity, if removed it will be readded when saved. Note: To reference an element inside the content, the tag result from the Insert Tag button will look similar to [Element context="current" type="content" key=" Name of the field to be referenced " /]. Other Tag such as Property, Style Sheet, URL Path will be similar.

Creating the Event presentation template


Using the steps outlined above for the Landing presentation template, use the criteria in the next sections to create the Event template. Name: Event Display title: Event Description: Event item presentation template. Presentation Markup: See below

203 of 439

Event page code snippet


1: 2: <!-- Event PT --> 3: <div class="contentEditContainer contentDetail"> 4: <div class="head"> 5: <h2 class="itemTitle">[Property context="current" type="content" field="title"]</h2> 6: <div class="rating">Product Rating:[Plugin:ratings]</div> 7: </div> 8: <div class="body"> 9: <div class="itemSummary"> 10: [Element context="current" type="content" key="ImageLg"] 11: <p>[Element context="current" type="content" key="date 1" format="DATE_TIME_SHORT"][Element context="current" type="content" key="date 2" format="DATE_TIME_SHORT" start=" to "][Element context="current" type="content" key="location" start="&lt;br&gt;"]</p> 12: </div> 13: <div class="itemBody"> 14: [Element context="current" type="content" key="Details"] 15: </div> 16: </div> 17: <div class="foot"> 18: <div class="tagging"> 19: <div id="tags">[Plugin:tags]</div> 20: </div> 21: </div> 22: 23: <!-- Additional component references --> 24: [Element context="current" type="content" key="File"] 25: [Element context="current" type="content" key="Complimentary"] 26: </div>

Creating the Products presentation template


Following the steps above for the Landing presentation template, use the criteria in the next sections to create the Product template. Name: Products Display title: Products Description: Product item presentation template. Presentation Markup: See below

204 of 439

Product page code snippet


1: 2: <!-- Products PT --> 3: <div class="contentEditContainer contentDetail"> 4: <div class="head"> 5: <h2 class="itemTitle">[Property context="current" type="content" field="title"]</h2> 6: <div class="rating">Product Rating:[Plugin:ratings]</div> 7: </div> 8: <div class="body"> 9: <div class="itemSummary"> 10: [Element context="current" type="content" key="ImageLg"] 11: </div> 12: <div class="itemBody"> 13: [Element context="current" type="content" key="Details"] 14: </div> 15: </div> 16: <div class="foot"> 17: <div class="tagging"> 18: <div id="tags">[Plugin:tags]</div> 19: </div> 20: </div> 21: 22: <!-- Component Reference --> 23: [Element context="current" type="content" key="Related"] 24: [Element context="current" type="content" key="Complimentary"] 25: </div>

Preview of Products presentation template


The following image shows one of the portlets on the River Bend Tea page displaying a selected content item using the Products presentation template.

205 of 439

Creating the News presentation template


Using the steps outlined above for the Landing presentation template, use the criteria in the next sections to create the News template. Name: News Display title: News Description: News item presentation template. Presentation Markup: See below

206 of 439

News page code snippet


1: 2: <!-- News PT --> 3: <div class="contentEditContainer contentDetail"> 4: <div class="head"> 5: <h2 class="itemTitle">[Property context="current" type="content" field="title"]</h2> 6: </div> 7: <div class="body"> 8: <div class="itemSummary"> 9: [Element context="current" type="content" key="ImageLg"] 10: <p>[Property context="current" type="content" format="relative" field="publishdate"]</p> 11: </div> 12: <div class="itemBody"> 13: [Element context="current" type="content" key="Details"] 14: </div> 15: </div> 16: <div class="foot"> 17: <!-- Additional component references --> 18: [Element context="current" type="content" key="Related"] 19: </div> 20: </div>

Mapping the authoring templates and presentation templates


Pairing the authoring and presentation template is an important step to ensure pages and content items are displayed correctly with the right information. The mapping of these templates can occur at several different levels within WCM. Top level Site Area Nested Site Area Authoring Template

Landing page
For the River Bend landing page we are going to set a Default mapping of the Landing Page authoring template to the Landing presentation template. 1. From the Library Explorer navigate to the authoring templates view. 2. Tick the check-box beside the Landing Page authoring template and click the Edit button. 3. Within the Item Properties section > Default Presentation Template option, using the Select Presentation Template link choose the Landing presentation template.

207 of 439

4.

Click the OK button. The following figure shows applying the default mapping.

5. Click the Save and Close button to apply your default mapping.

Applying a default template mapping may not always be appropriate/required, using the site area to address mapping the authoring templates with presentations templates is an alternative. Using the following steps pair the different templates together at the River Bend site area levels.

Other authoring template to presentation template maps


To map other authoring templates with the presentation templates: 1. From the Library Explorer, navigate to Content > Riverbend site area. 2. Select the Riverbend site area and click the Edit button. 3. From the Site Area Properties section, click the button Manage Template Maps.

208 of 439

4.

Click the button, Add.

5. A list of available authoring templates and presentation templates are displayed as above. 6. In the Authoring Template section choose Event. 7. In the Presentation Template section, choose Event. 8. Click the button, OK. 9. The two templates are displayed as mapped. 10. Click the button, OK. 11. Repeat steps 3 through 10 to create the remainder of the template mappings for the site areas according to the screenshot below. Be sure to select the appropriate site area for each template mapping. 12. Click the button, OK and then the Save and Close button to apply all the mapping.

209 of 439

The following figure shows all site area level maps.

Note: All children site areas will inherit these mappings unless a further mapping is applied in a lower nested site area using the same authoring template; this overrides any prior maps.

Configuring the portlets for pages


Portlets is used in the River Bend site is to display appropriate content within the context of the page. Content displayed within the River Bend site may be a content item (via it's defined presentation template), image, menu or personalization component, amongst others. The Web Content Viewer portlet used to display content on a page can also be "optionally" influenced by other IBM Web Content Manager (WCM) elements such as: Alternate presentation templates Profiled categories, site areas and authoring templates Rendering plugins Caching and linking Tag scopes

In this section, we describe how to modify the portlet configurations used for presenting content in the River Bend site. The portlets were previously added when the River Bend pages were created from the portal page templates.

210 of 439

Configuring the River Bend Home page portlets


The following steps outlined below will describe placing the page, and first portlet in to a mode for configuration. Also detailed are the specific portlet configuration options, 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Access the IBM WebSphere Portal Welcome page. Click the Log In link, and sign into the portal. From the navigation menu at the top of the page, access the River Bend Home page. Using the Actions link place the page in edit mode by clicking on the Edit Page option. With the page now in an editable mode the portlets are exposed for configuration. Using the Display Menu link in the top right hand corner of the portlet, click the Edit Shared Settings option. The Web Content Viewer portlet can now be configured. The initial banner image is what will be configured for the first portlet. Set within the portlet the option for Content type:, select component. Using the Edit link for the Component: option to referenced the /Riverbend/Site Images/Riverbend site banner component. Using the Edit link for the Content: select the /Riverbend/Riverbend/Home/Home content item if not already selected. Scroll to the bottom of the portlet and click the OK button to save your configuration.

The following image shows the first portlet configured with an image component.

The River Bend home page is assembled from 4 or more Web Content Viewer portlets, each portlet configured differently to display content and components as needed. Using the diagrams shown and their specific option selections, configured the portlets using the same steps as outlined above.

211 of 439

Home page portlet configuration


Portlet configuration options for the main River Bend home page is as shown below.

Tea page portlet configuration


The Tea product page portlet configuration is as shown below.

212 of 439

Coffee page portlet configuration


The Coffee product page portlet configuration is as shown below.

Events Community page portlet configuration


The Events Community page portelet configuration is as shown below.

213 of 439

News Community page portlet configuration


The News Community page portlet configuration is as shown below.

3.2.9. Creating the content


This section provides steps to create and link content for display within the River Bend site. In its subsection, we describe how to view the content within the site, and view the content within the context of the content viewer portlet.

Creating content, and assigning it as the default content


To create a content item, follow these steps: 1. 2. 3. 4. 5. From the Library Explorer, click the New button and select Content From the authoring template list, choose Landing Page, click the OK button. In the name field, enter Home. Type in the Description: field, Default content for the Riverbend home page. Type in the Body field the following text: Our company Riverbend has been established since 1971, and for 30+ years we've been in the business of making our own special blends of teas & coffees. Today Riverbend is a thriving business, and community, serving millions of customers in over 10 different countries. We welcome you to our site, and hope you enjoy your experience when you next visit one of our stores.

214 of 439

Take a look at our featured news items, seasonal products and tasty daily special offers. The default content we use for the Riverbend home page also contains additional elements to include WCM components as part of the content item. Next we will add these components to the content item. 6. In the Post Body Component, click select Component and select the Menu Featured Content item.

Featured content component

Note: When selecting a component item it can be quicker to select your component via the Recent Items (if youve recently edited/view the component) or Favorite links.

7. Click the Save and Close button. In a previous section we created the Riverbend Home page, this was created from a template (Riverbend 3 Portlet Layout), and was also mapped to the corresponding site area called Home to default the context for content. We now need to assign the content we created in the steps above to the Home site area. 8. From the Library Explorer navigate to the Riverbend site area. 9. Tick the site area Home, and click the Edit button.

215 of 439

10. From Site Area Properties section, click the Select Default Content link, choose the Riverbend/Home/Home content item and click the OK button. 11. Click the Save and Close button.

Creating additional content items


In the previous steps the default content item was created for the Home page. The following table contain information about creating the additional content items for the remaining sections of the website.

Default content items


Using the information listed in the tables below create content items with the authoring template specified, each content item should also be assigned to a site area. Site area: Riverbend/Products/Coffee Field / Element Name: Display title: Description: Body: Content Coffee Coffee Default content and landing page for Coffee site area Coffee or Caffe in most locations. In the 9th century it was coffee was discovered in the highlands of Ethiopia, so coffee has been around for a very long time, and loved by billions of people every day. In 1971 we started roasting our own blends of coffee beans. Our process for roasting coffee beans (or seeds as they should be called ) is a well-kept family secret, but we can tell you that it takes a full 22 minutes to roast them so we can boast the best and flavoursome beans make our world famous coffee. Coffee is the beverage that gets us up and going in the morning, it keeps us alert and awake into the night. We take the best base product from the worlds largest producer, Brazil and work our magic every day so you can keep going. Site area: Riverbend/Products/Tea Field / Element Name: Display title: Description: Body: Content TeaHome Home Default content and landing page for Tea site area Tea or Teh, the, chai, theyila Tea is loved by the world over and whilst it might be called something different (cha in China and theyila in Malayalam) it's based on 4 pure types: 1. Black 2. White

216 of 439

3. Green 4. and Oolong We take these dried base teas and add our own special additive, all natural to offer you a range of over 12 types of tea in store. Our tea making process is a secret but we can tell you it takes a long time to perfect but worth every minute we hope. We know we sell allot of tea, but did you know that production of tea is over 3 million tonnes per year with both China and India being the largest producers. Site area: Riverbend/Products/Food and Snacks Field / Element Name: Display title: Description: Body: Content FoodHome Home Default content and landing page for Food and Snacks site area Hot or Cold you can't beat our food and snacks made by Riverbend staff in store.

Baked by our master bakers in country the bread for our sandwiches doesn't travel far to be married up with locally sourced ingredients. Whether it's Eggs, cold meats or salad, our sandwiches are made with ingredients produced and farmed locally to the store. Making our own sandwiches in store with locally prodyuced ingredients not only saves the environment, but also means they taste great and are fresh too.

If youre not in the mood for a sandwich, then we have plenty of cakes available too, why not try a delicious Orange cake, Carrot cake or even our fabulous Chocolate cake. We also make speciality cupcakes, different in every store and every week, something a little lighter and fun. Just take a look at what we have to offer in store to go with your Tea, Coffee of soft drink. Site area: Riverbend/AboutUS/History Field / Element Name: Display title: Description: Body: Content HistoryHome Home Default content and landing page for Food and Snacks site area The River Bend Tea & Coffee company has not always been as big as it is today, when John Bergland set up the business

217 of 439

back in 1971 it was running from his home with 1 employee, himself. Back then John used his families experience roasting coffee to give a unique flavour & texture to the beans his coffee was made from. John just sold coffee then, today things are different. Today the River Bend products are in demand by our customers, we still use the same family style of roasting but we've also gone back through the family archives to adopt the same values across our entire product range. River Bend strives to ensure the best experience in store with the best true Italian style and quality coffee & teas. Unlike many other coffee companies and stores we make many of our products, tea and coffee included on site in our stores. This means you get the best and we save costs and the planet at the same time. Site area: Riverbend/AboutUS/Careers Field / Element Name: Display title: Description: Body: Content CareersHome Home Default content and landing page for the careers site area During the next 12 months River Bend will be opening 24 new stores across the UK, USA, Europe and India. If you feel that you have what it takes to work at River Bend and want to join a growing, fun and exciting team then we urge you to get in touch. All our stores will have openings for, Delivery Agents, Store Staff and Management including Cleaners and Security. River Bend is working in partnership with local recruitment offices close to the new store planned below: UK West Chiltington, West Sussex Cheam, Surrey Staines, Middlesex Fulham, London London, City (3 stores) Europe Berlin, Germany (3 stores) Barcelona, Spain (2 stores) St. Omer, France USA Westford, MA Cambridge, MA Rochester, NY (2 stores) Samford, CT (3 stores) Orange County, NY India Bangalore o Delhi

218 of 439

Post Body Component:

Select component > Riverbend/Default Article Text with List

Site area: Riverbend/Community/Events Field / Element Name: Display title: Description: Body: Content EventsHome Home Default content and landing page for the events site area At Riverbend we love events, so much we make sure every store is an integral part of your local community. Making the most of what good in around your store and our products & services. Take a look through our event schedule.... [Component name="Riverbend/DefaultArticleText"]

Event content items


Using the information listed in the tables below create content items with the authoring template specified, each content item should also be saved in the site area stated. Site area: Riverbend/Community/Events Field / Element Name: Display title: Description: Start Date: End Date: Location: Body: Content CoffeeAndJazz Coffee and Jazz Local Jazz musicians play the London Southbank store. Sept 11, 2011. 9pm Sept 11, 2011. 11pm London, Southbank. United Kingdon At Riverbend we believe Coffee and Jazz are a great combination. With ten of the top Jazz bands in the London area we thought you'd like to spend a few evenings with us listening to the best Jazz, drinking great coffee and helping support the local music community. For two weeks our London store is going to play host to ten of the top bands, between 6 and 8pm weekdays. Best of all it's FREE to come along and join in. To spice things up, with every coffee you buy were donating 50p towards local music education programs dedicated to Jazz in London. Come along, and enjoy. Large Image: CappuchinoLg.jpg

219 of 439

Small Image:

CappuchinoTn.jpg

Site area: Riverbend/Community/Events Field / Element Name: Display title: Description: Start Date: End Date: Location: Body: Content TeaTuesdays Tea Tuesdays Flavoured Tea giveaway with every drink purchased. October 03, 2011. 11am October 31, 2011. 11pm Raleigh, NC. United States We love our flavoured Teas at Riverbend, and we think you will to if you try them. Throughout October we are giving you a new takeaway flavoured Tea sachet with every drink purchased, With over 8 different types of Tea in store we think there is one you'll just love. Why not try our: Jasmine Pepermint Lemon Herbal Green Remember it's throughout October only, so come on Tea lovers. Enjoy Large Image: Small Image: FlavouredTeaLg.jpg FlavouredTeaTn.jpg

Site area: Riverbend/Community/Events Field / Element Name: Display title: Description: Start Date: End Date: Location: Body: Content CommunityDays Community Days Helping the young in the community. September 12, 2011. 11am December 23, 2011. 11pm Hamilton, New Zealand. Riverbend believes that the future of our planet lies with the young people in our community.

Every Riverbend store and employee strives to find innovative ways to help their communities grow, and we are behind them in doing this. Our employees have committed over 1,000 hours of community help which is a great achievement in a short space of time.

220 of 439

If you work with the young people in the local community, bring with your Raleigh Community Card next time your in the store and we will give you and extra shot of coffee to keep you going, or if you like your Tea complimentary snack. Enjoy Large Image: Small Image: CommunityLg.jpg CommunityTn.jpg

Recipe content items


Using the information listed in the tables below create content items with the authoring template specified, each content item should also be saved in the site area stated. Site area: Riverbend/Recipes Field / Element Name: Display title: Description: Recipe: Content RecipeCoffeeWalnutCake Coffee Cake Delicious, moist and full of flavour coffee & walnut cake with Riverbend ground fair trade coffee. Coffee and Walnut Cake.pdf

Site area: Riverbend/Recipes Field / Element Name: Display title: Description: Recipe: Content RecipeChocolateCake Chocolate Cake Deep and rich chocolate cake made with 60% coco. Chocolate Cake.pdf

Site area: Riverbend/Recipes Field / Element Name: Display title: Description: Recipe: Content RecipeBerrySpongeCake Berry Sponge Cake Soft and creamy sponge with a sweet all natural berry sauce, topped with vanilla icing. Berry Sponge Cake.pdf

Site area: Riverbend/Recipes Field / Element Name: Display title: Content RecipeCitrusCarrotCake Citrus Carrot Cake

221 of 439

Description: Recipe:

Zesty carrot cake, filled with a citrus cream filling. Citrus and Carrot Cake.pdf

Site area: Riverbend/Recipes Field / Element Name: Display title: Description: Recipe: Content RecipeLemontCake Lemon Cheese Cake The best deep filled lemon cheese cake made from all natural ingredients. Lemon Cheese Cake.pdf

Key Products content items


Using the information listed in the tables below create content items with the authoring template specified, each content item should also be saved in the site area stated. Site area: Riverbend/Key Products Field / Element Name: Display title: Description: Body: Content JasmineTea Jasmine Tea Cheer up your day with a freshly brewed Jasmine tea. Need cheering up, been a long day? Jasmine tea is is beautifully scented to give you a refreshing smell and taste with every sip. We steam brew our teas with Jasmine at 80 degrees to make sure you get all the flavour. Large Image: Small Image: Complimentary Items: Related Products: Site area: Riverbend/Key Products Field / Element Name: Display title: Description: Body: Content CeylonTea Ceylon Tea Spoil yourself with a rich and intense Ceylon tea. Feeling like you want something special when it comes to your choice of tea? then Ceylon is the one for you. We believe that the best way to enjoy Ceylon tea is pure and not blended. It's rich golden colour, and intense strong flavour lets you know it's a quality tea for when you need that JasmineTea.jpg

222 of 439

something special. Large Image: Small Image: Complimentary Items: Related Items: CeylonTea.jpg

Site area: Riverbend/Key Products Field / Element Name: Display title: Description: Body: Content ChaiCaffeCreme Chai Caffee Creme Spoil yourself with a rich and intense Ceylon tea. We know that every now and then your Caffe Americano doesnt hit the spot, or your usual Late is lacking that something. Our twist on the Swiss style long twice brewed espresso is just right for that moment, Something different for when you need that change.. you never know you may not change back. Large Image: Small Image: Complimentary Items: Related Items: ChaiCaffeeCreme.jpg

Site area: Riverbend/Key Products Field / Element Name: Display title: Description: Body: Large Image: Small Image: Complimentary Items: Related Items: Content CaffeAmericano Caffe Americano Rich, dark and moody. Something to give you a little boost, our darkest shot of expresso with piping hot water will hit the spot every time. CaffeAmericano.jpg

Site area: Riverbend/Key Products Field / Element Content

223 of 439

Name: Display title: Description: Body:

CaffeLatte Caffe Latte Double-shot Caff Latte to kickstart the day. If it's a hot or cold day sometime you need to give yourself a little kickstart, a Caff Latte double-shot is what you need.

We take very hot and pure steamed milk, 2% or semi skimmed and infuse it with a double-shot of our finest roasted coffee ground and brewed in store.
If you want something more, feeling sweet then why not add a drizzle of Caramel or Chocolate. Large Image: Small Image: Complimentary Items: Related Items: CaffeLatte.jpg

Article content items


Using the information listed in the tables below create content items with the authoring template specified, each content item should also be saved in the site area stated. Site area: Riverbend/Home/AboutUs/Products Field / Element Name: Display title: Description: Body: Image: File: Related Link 1: Related Link 2: Related Link 3: Content IngredientsandNutrition What's in our Products Ingredient and nutritional information for Riverbend products. [Component name="Riverbend/DefaultArticleTextWithList"]

Site area: Riverbend/Home/AboutUs/Locations Field / Element Name: Display title: Description: Content InStore In Store Card How to get the most from your store card.

224 of 439

Body: Image: File: Related Link 1: Related Link 2: Related Link 3:

[Component name="Riverbend/DefaultArticleTextWithList"]

Essential Link content items


Using the information listed in the tables below create content items with the authoring template specified, each content item should also be saved in the site area stated. The content items created below are links to content created with the Article authoring template above. Site area: Riverbend/Links/In Store Field / Element Name: Display title: Description: Link: Content LinkstoNutritionIngredients Links to Ingredients and Nutrition Ingredient and nutritional information for Riverbend products. Riverbend/Riverbend/Home/About Us/Locations/In Store Card

Site area: Riverbend/Links/Nutritional Information Field / Element Name: Display title: Description: Link: Content LinkstoStoreCard Links to Store Card Using the Riverbend store card. Riverbend/Riverbend/Home/About Us/Products/What's in our Products

Viewing the content within the site


The section describes how to view the content within the site, and how to view the content within the context of the content viewer portlet. We cover the following topics: Viewing the sample site after you have defined the default content areas, Viewing the content in a portlet Creating a portal page and adding the the content Viewer Portlets Configuring the portlets

225 of 439

Opening and viewing the River Bend site in a browser


After you have assigned default content to the site areas, the River Bend website is ready for browsing. To open and view the River Bend website in a browser, follow these steps: 1. Open a web browser window. 2. Enter the following URL. You should replace <your Servername with your actual values. http:// <your Servername :<port usually 10040 /wps/wcm/myconnect/RiverBend For example, the site for the example River Bend site is: http://wcm01.itso.ibm.com:10040/wps/wcm/myconnect/RiverBend/RiverBend/Home This will open the home page and you can continue navigating the pages from there. Tip: If you cannot view a certain page as you navigate the site, the default content for that page might be missing. Be sure that you have defined default content for all site areas.

Viewing content in a portlet Creating and copying Content Viewer portlets


The Local Rendering Portlet is installed with the Authoring user interface. You can make copies of this user interface. For this specific example, you are specifying your own configuration for the River Bend website, and you do not configure the base portlet. To create two copies of the Web Content Viewer portlet, do the following: Navigate to the Administration tab. Click Portlet Management. Click Portlets. In the Search window, type Web and then click Search. Find the Web Content Viewer portlet and click the Copy Portlet icon. In both the portlet application and the portlet fields, enter the new name: WCM River Bend. 7. Click OK. 1. 2. 3. 4. 5. 6.

Creating a Portal page and adding the Content Viewer portlets


To create a Portal page and to add two Portlets to the page, do the following: 1. 2. 3. 4. 5. 6. Navigate to the Administration tab. On the left hand side, expand Portal User Interface is not expanded. Click on Manage Pages. Click on Content Root. Click New Page. In the Title field, enter River Bend Coffee and Tea.

226 of 439

7. In the Type of Page section make sure Standard Portal Layout property is selected (default value). 8. Click OK. 9. In the list of pages, navigate to your created page. 10. Select the Edit Page Layout icon (see the figure below).

11. 12. 13. 14. 15. 16. 17. 18.

In the left column of the window, click Add Portlets. In the Search window, type WCM and click Search. In the returned portlet list, select WCM River Bend Navigator. In the right column, click Add Portlets. In the Search window, type WCM and click Search. Select WCM River Bend. Click OK and click Done. In the Search window, type River and then click Search. 19. Find the River Bend Coffee and Tea page and click the Mark icon.

20. Click on Select Page, click on Content Root, click on Administration, click on WebSphere Portal. 21. Click on the Move button. Now, the page has been moved under Administration and could be accessed from the left navigator.

Configuring the portlets


You need to configure the new Portlets on the River Bend Coffee and Tea Portal Page to show the NAV-Left navigator in the left portlet and content in the right portlet. To configure the portlets, follow these steps: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Navigate to the Administration tab. On the left hand side, choose River Bend Coffee and Tea. In the left Portlet, click the Edit Shared Settings icon. In the content type, select Component. Click the Edit icon in the content item navigator. Select Navigator. Select Left Navigator. Click OK. Click the Edit icon in the Content section. In the content item navigator, expand River Bend. Select Home. Click OK. In the Links section, select This page under Broadcast Links To. Under Receive Links From, select Other portlets and this portlet. Click OK.

227 of 439

3.3. Managing the publishing process


One of the key goals of a content management system is to coordinate editing activities among groups of content authors and editors. Coordination in this context references the following key activities: Work with security - Controlling access to resources for read, write, or delete Work with workflow - Allowing users to contribute and review content in an organized way Using collaboration tools - Managing different versions of libraries, design, and content. Using collaboration tools - Locking shared resources while they are edited Previewing content - Providing tools to ensure consistency between different content items

3.3.1. Working with security


The objective of IBM Web Content Manager (WCM) security is to ensure that users and groups have access to the appropriate content, and system capabilities to perform their tasks. To accomplish this, WCM provides tools for the following purposes: Controlling who can create content and design elements of a given type. Targeting the views and actions available in the Library Explorer for each user/group. Determining which items are visible for a user/group when accessing them though the Library Explorer view, and within the website.

This section explains how security works in WCM, and how to set up the River Bend site security.

Overview of security
WCM security is based on portal security which provides a module called Virtual Member Manager (VMM). VMM is capable of managing multiple LDAPs and databases for a single portal instance. Portal security provides utilities to create, update, and delete users and groups through the administration interface. Permissions are organized using a tree-like structure. You start by defining a general permission set for all libraries at the IBM JCR repository, refining them for every type in the library (such as components and authoring items), for each item type and finally item by item. By default, access levels are propagated and inherited by using the hierarchy shown in the following figure.

228 of 439

Note: Access control delegation can be applied at a portal page level.This provides the View access to all items on the page (including content), and overrides what has been set elsewhere. AC delegation can be set during page creation (or afterwards) via the administrative interface. The following figure shows access control delegation during the page creation step.

The following figure shows access control delegation during the page edit (after creation) step.

Propagation and inheritance of permissions can be stopped at any level of the tree showing in the security hierarchy. The security levels are based on portal roles. For library security there are five levels: User Cntributor

229 of 439

Editor Manager
Administrator.

Item security has four security levels: User Contributor Editor Approver.

The security levels are explained below.

Security levels in WCM


IBM WCM data resides in a repository called the IBM Java Content Repository (JCR). Inside the JCR, WCM libraries are organized in a hierarchy with a common root. The security roles set on the content library root are propagated to all libraries. This is important if you want to add more WCM administrators. By default, only administrators have access to work with web content libraries. To allow other users to work with web content libraries, such as virtual portal administrators, you have to assign them access to the JCR content root node.

Library security
With library level security, you can establish a common set of permissions that are refined later. Library security is based on portal roles as defined in the following table. Roles User Rendering and authoring portlet access rights Users and groups assigned to this role can: View items in a website or rendering portlet that they have been assigned at least user access to.

Note: The simplest way to assign users to this role is to select any of the default user groups such as "All Authenticated Portal Users" or "Anonymous Portal User". Users will still require "user" access to an item before it will be rendered in a website or rendering portlet. Contributor Users and groups assigned to this role can: Have all user's access right (as described above). View libraries the they have been assigned contributor access to in an authoring portlet. Access the "My Items" and "All Items" views in an authoring portlet for libraries that they have been assigned contributor access to. Access the item type view within the authoring portlet for item types that they been assigned at least user access to. Users and groups assigned to this role can:

Editor

230 of 439

Have all contributor's access rights (as described above). For library item types that user and groups have been assigned at least editor access to, editors can also access the following actions in the authoring portlet: - Create a new item. - Add or remove links. - Apply authoring template. - Copy, delete, edit, link to, and move item type. - Restore a version. - Edit version labels Users and groups assigned to these roles can:

Manager

Have all editor's access rights (as described above). For library item types that they have been assigned manager access to, managers can also perform the following actions in the authoring portlet: - Edit access settings. - Edit next stage. - Purge. - Unlock. - Edit user profile. Users and groups assigned to these roles can:

Administrator

View items in a rendering portlet or servlet-rendered website that they have been assigned at least user access to. View libraries the they have been assigned contributor access to in an authoring portlet. Access the "My Items" and "All Items" views in an authoring portlet for libraries that they have been assigned at least contributor access to. All actions in the authoring portlet for library item types that they have been assigned administrator access to. These roles have no access to WCM items.

Security Administrator Delegator Privileged User

To render WCM objects, a user must be granted at least the User role on the library itself, as described above. For details of this requirements, and up to date information, refer to the IBM Portal Wiki, WCM documentation.

River Bend security model


The following section discusses the security model for the River Bend sample site. The River Bend website is organized into a single top level home page, three nested site

231 of 439

areas under the top level, and finally several child site areas under these. See the figure below.

Security levels for the River Bend site


This website has the following security requirements: There are five groups of users that can create (author) content: 1. General authors can create content for the home page (riverbend_ContentAuthorsStoreMgr) 2. Content creators from the marketing department can create content for the Community and About Us sections (riverbend_ContentAuthorsMarketing). 3. Content creators from the operations department can manage all of the Products and Key Products sections (riverbend_ContentAuthorsOps). 4. All content creators can manage General sections, such as Recipes and Links (rivervend_ContentAuthors). 5. Administrative users can create content as needed across the site for backup to the ContentAuthor groups. Approval for publish content must be provided by three different departments: 1. Headquarter staff (HQ), rivernbend_ContentApproversHQ 2. Human resources (HR), riverbend_ContentApproversHR 3. Legal, riverbend_ContentApproversLegal Content must expire automatically or manually by people from the following groups: 1. The author 2. Any of the groups of approvers from HQ, HR, Legal, and Admin. Any user must be able to view published content.

With this security requirements, River Bend has prepared a permission matrix. For every

232 of 439

site area (e.g. Home, Products), there are three table rows shown for readers, editors, and approvers permissions. For simplification, we use the following abbreviation in the table below: RB-Authors - riverbend_ContentAuthors RB-Approvers - riverbend_ContentApprovers (riverbend_ContentApproversHQ, riverbend_ContentApproversHR, riverbend_ContentApproversLegal RB-StoreMgr - riverbend_ContentCreatorsStoreMgr (riverbend_ContentAuthorsStoreMgr) RB-Ops - riverbend_ContentCreatorsOps RB-Marketing - riverbend_ContentCreatorsMarketing DRAFT HOME Author RB-StoreMgr Authors Joint approval from: RB-Approvers RB-Approvers APPROVAL Author RB-Approvers PUBLISH All users EXPIRED RB-Approvers REJECT Author

PRODUCTS KEY PRODUCTS

Author RB-Ops Author

Autor RB-Approvers

All users

RB-Approvers

Author

Joint approval from: RB-Approvers RB-Approvers Author RB-Approvers All users RB-Approvers Author

ABOUT US COMMUNITY

Author RB-Marketing Author

Joint approval from: RB-Approvers RB-Approvers

LINKS RECIPES

No workflow

River Bend library level security settings


All Users will have read access to the River Bend library as shown below.

233 of 439

Authors and Approvers will have contributor access as shown in the following figure.

User permissions are inherited. Contributor permissions are established at the next level, library resources.

234 of 439

Library resources
When a user accesses the Library Explorer, several views are available to access item types managed by WCM, such as authoring templates, components, or content. In a production systems, not all user groups need to access every WCM feature. Therefore, the next level in the permissions hierarchy is the management of access to these item types.

River Bend library resource security settings


To avoid any user from seeing the Library Explorer view, inheritance is disabled for all resource types: Authoring templates, Components, Content, Presentation Templates, Site and Site Areas, Taxonomy, Workflow, and Workflow Elements. Content creator (authors) and Designers are allowed Editor access to content as shown below.

Approvers have Contributor access, as shown below.

River Bend item level security


As previously described, library security is propagated by default to the library items. However, it is possible to override these permissions at the item level. Four different access levels can be granted to specific WCM items: User Contributor: read Editor Manager

235 of 439

1. Item level security management depends on whether the item has a workflow: Administrator security settings are provided for every item. If the item has a workflow, effective security settings are the combination of inheritance, administrator, and current workflow stage security settings. If the item does not have a workflow, effective security settings are the combination of inheritance, administrator, and user security.

Security settings can be batch processed through the Library Explorer. Every item includes a security section to read. Edit these permissions as shown in the following figure.

The columns displayed in this table depend on whether the item is under a workflow: Workflow items display the administrator defined, workflow, and inheritance. Workflow settings depend on the current workflow stage and cannot be edited. Non-workflow items display the administrator defined, user defined, and inheritance.

Note: Administrator defined permissions do not depend on the current workflow stage. Defined below are the security permissions set to manage who can create content in areas of the River Bend website, these are set in the Properties tab of the site area.

Home site area permission


The following screenshot shows the home site area permissions.

236 of 439

Products site area permission


The following screenshot shows the Product site area permissions.

About Us site area permission


The following screenshot shows the About Us site area permission.

Community site area permission


The following screenshot shows the Community site area permissions.

Content elements
It is possible to filter who sees a specific content element for reading or editing, for example an image element on the Products authoring template. At River Bend this level of access is not needed at present, however this is a useful level of security to restrict editing (or reading) of elements on a content item by different user groups or departments.

237 of 439

To set this level of permissions if required, open in edit mode the default content settings of the authoring template. Expand the content element, click the field properties icon , and select the Editors or Viewers you require as shown in the figure below.

Local rendering portlet or remote rendering portlet


To access WCM items through portal, a user or group must be granted access to different portlets depending on the task to perform: Local Web Content Viewer portlet Remote rendering portlet Library Explorer ( the content creators, and approvers interface) Library administrative portlets

238 of 439

The remote rendering portlet (now deprecated) is used to communicate with another WCM server to render its content. The remote rendering portlet can use either LTPA or Credential Vault Slot to transfer user identity: LTPA Token: Exported from one server and imported to the other; current user credentials used Credential Vault Slot: Stored specific value to use for all users accessing the portlet

Note: It is important to note that remote rendering portlet is still available if required but has been replaced. WSRP (Web Services Remote Portlets) should be used against the local Web Content Viewer (JSR 286) portlet.

3.3.2. Working with workflow - Creating basic and custom workflows


A workflow is a process used to control item state and security. In IBM Web Content Manager (WCM), workflows are designed by combining three kinds of elements: Status - Controls whether the item is displayed in the website. Stages - Represents a step in the overall workflow. Actions - Triggers when the user enters or exists a workflow stage.

Workflows are assigned by site designers to one or more authoring templates. Workflows have access permissions so content authors can choose from any of the visible workflows assigned to the current authoring template. This section explains how workflow works in WCM and how to create both a basic workflow and a custom workflow for the River Bend site.

Creating a basic workflow for the River Bend site


In this section, we explain how to create a basic workflow within the context of the River Bend site. River Bend requires three different ways of publishing information (see the figure below): Approval - This is the default workflow. Items may have four states (draft, approval, published and expired). Express - Covers the exception items. It is used primarily to directly publish from draft to published state. None - No approval or review is required.

239 of 439

Note: As mentioned previously, workflows have their own security setting which can be used to manage alternative ways to publish the same content. The River Bend site designers use this feature to restrict the use of express publishing to the contentWFExpressUsers group. These users can short-cut the content publishing processing when dealing with exceptions.

Item status
An items status, typically content, controls whether it is visible in the website. A WCM "workflowed" item has three states: Draft - The item is not published yet and is not available on the live website. Publish - The item is published and thus is available on the live website. Expired - The item is no longer published.

A WCM "non-workflowed" item, or one that has no workflow defined has only one state, which is published . Note: When progressing through a workflow, item status can only change in a linear fashion: Draft to published to expired Published to expired Draft to published

Stages
Stages represent a step in the overall workflow process. With the use of stages, site designers can define the actions that will happen with a content and the necessary conditions (approvals) from the time it is created to the time it expires:

240 of 439

Workflows can have one or more stages. Content states happens when a content item reaches a new stage.

More actions can be performed when an item enters or leaves a stage: Workflow stages determine the content security for a particular stage. (Do not confuse this with the security of the stage itself.) Setting approve access is only available through the workflow stage. Such options as "Joint approval" and "Enter comment on approval" are set in the workflow stage. (Enter comment on approval can be across the workflow.)

Workflow stages for the River Bend site


The following table shows the workflow stages for the River Bend site. Stage Draft Actions on Entering Security User: Contributor: Editor: Manager Approver: [authors] Description All content begins the workflow in this stage. All content authors groups are authorized to use the draft stage inheriting the permission settings at the library resource level. Content requires a review stage before being published. Three groups of people are authorized to approve content. People of all three groups must joint approve a content item before its published

Approval

User: [authors], riverbend_ContentApproversHR, riverbend_ContentApproversHQ, riverbend_ContentApproversLegal Contributor: Editor: Manager Approver(*): riverbend_ContentApproversHR, riverbend_ContentApproversHQ, riverbend_ContentApproversLegal *= joint approval

Publish

Generate thumbnail Publish Move content on expiry date

User: [anonymous portal user], [all authenticated portal users] Contributor: Editor: Manager Approver: riverbend_ContentApproversHR, riverbend_ContentApproversHQ, riverbend_ContentApproversLegal

This is the stage where content from the workflow is published. A workflow custom action generates a thumbnail from an existing image for Products and News. The Publish action is triggered and the content is visible on the website. The Scheduled Move action is also triggered

241 of 439

when the Expire Date is reached Expired Expired User: Contributor: Editor: Manager Approver:riverbend_ContentApproversHR, riverbend_ContentApproversHQ, riverbend_ContentApproversLegal, riverbend_ContentCreatorsMarketing, riverbend_ContentCreatorsOps, riverbend_ContentCreatorsStorMgr User: Contributor: Editor: [authors] Manager Approver: The Scheduled Move action moves the content into this stage, where the Expire action stops the document from being visible on the website

Reject

Email for rejected content

Rejected content reaches this stage. Authors are able to create a new draft from the rejected content.

Actions
Workflow actions can be triggered when an item enters or leaves a workflow stage. WCM provides several types of actions that you can extend by writing your own action, packaging them as EAR or JAR files: Scheduled move action: Used to move workflow items to the next stage based on date E-mail action: Used to e-mail users when an item reaches the stage State change actions: Change the item state to publish or expire Version actions: Create a new version of the item when this action is executed Scheduled move action: Moves an item to the next workflow stage at a specified date and time Custom actions: Allows the ability to create new actions by using Java code and packaging them as EAR or JAR files

River Bend workflow actions


The following table shows the workflow actions. Action Publish Move content on expiry date Expired Description Makes a an item visible on the website This scheduled move action detects when a document has passed its expire date and moves the document into the expired stage Removes and item from being visible on the website. Note that this does not delete the item

Expired E-mail for Schedules the move of any items that meet the defined expiration rejected date Generate thumbnail Creates a thumbnail image for use in menus (and other components) by using a Java-based custom action

242 of 439

Creating the workflow actions


Note: The following section may have already been complete if you completed 3.2.5 Creating the workflows. If that is the case, go directly to Creating a custom workflow action. To create the workflow actions: 1. 2. 3. 4. Navigate to the Riverbend library. Click the New button and select Workflow Action > Publish Action. Type in the Name: field, Publish. Click the Save and Close button.

Additional actions are required. Use the steps 2 to 4 above, create the actions outlined below: Action Email for rejected Content Expired Move content on expiry date Generate thumbnail Action Type Email Action Expire Action Scheduled Move Action Custom Action

For the "Move content on expiry date" select Expiry Date from the Date Type list and choose an appropriate date to see this action, for example tomorrow's date. For the "Email for rejected Content", select E-mail authors. E-mail Stage Approvers is selected by default. Add an apology message in Additional e-mail text.

Creating workflow stages


To create workflow stages: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Navigate to the Riverbend library. Click the New button and select Workflow Stage. Type in the Name: field, Draft. Click the Save and Close button. Repeat the steps 2 through 4 outlined above for the Approval Stage. Click the New button and select Workflow Stage Type in the Name: field, Published. In the Properties section, click Actions under Execute on Entering Stage to select an action that is performed on any content that enters this stage of the workflow. Click the Add button. The Execute on Entering Stage dialog box opens. It lists all the available actions. From the list, choose the following Publish, Generate thumbnail, Move content on expiry date. Click the Save and Close button. Repeat steps 5 through 10 to create Expired stage, ensure that you set the Execute on Entering Stage action to Expired. Repeat steps 5 through 10 to create Reject stage, ensure that you set the Execute on Entering Stage action to Email for rejected content.

11. 12. 13.

243 of 439

Creating the Express workflow


The Express Workflow is the workflow that publishes content immediately without approval. Using this workflow allows specific River Bend departments and users the ability to save their content in draft and then publish immediately. An express type workflow can be useful where content updates require swift publishing, for example a spelling mistake, incorrect information or wrong product image. Follow the steps outlined below to create the Express workflow: 1. 2. 3. 4. 5. 6. Click the New button and select Workflow Type in the Name: field, Express Select Workflow Stages in the Properties section. Click the Add button Select Draft, Published and Expired from the list of workflow stages. Using the arrows to the right of the listed stages, move the stages into the order listed above in step 5. 7. Click OK button.

Creating the Approval workflow


The Approval workflow is the workflow that allows content to go through an approval stage prior to being in a published state. The content using this workflow can be rejected at any stage in the workflow, and will also expire after publication based upon a date. Follow these steps to create Approval workflow: 1. 2. 3. 4. 5. Click New button and select Workflow Type in the Name: field, Approval Click Select Workflow Stages in the Properties section. Click Add button. Select the following: - Draft - Approval - Published - Expired Select the Draft stage Using the arrows to the right of the list of stages, move the stages into the order listed above in step 5. Click the OK button. Click Select Reject Stage Select the Reject stage Click OK button. Click Save and Close button.

6. 7. 8. 9. 10. 11. 12.

Creating a custom workflow action


In this section, we describe the steps on how to create a custom workflow action for the River Bend website. River Bend wants to optimize the page size of their website. To achieve this goal, they generate a smaller image for products and news to be used in menus and navigators.

244 of 439

Several options are available to do this. The site designer has decided to implement a custom workflow action that reads the product image, generates a reduced image using Java APIs, and saves the new image as part of the content item before it is published. Using this approach introduces an automated process where previously this would have been a manual task.

Custom workflow actions


Custom workflow actions execute your custom code as part of a workflow process. This functionality is implemented by using the Eclipse Plug-in framework that is integrated in WebSphere Application Server, enabling you to deploy your code without restarting portal. You can use WCM APIs inside custom actions to read or update the content items that are being processed or any other content items. The creation process of a custom action has three steps: 1. Development Develop Java code for the action. Two classes will be necessary, the actual code that will be executed every time the action runs (based on the CustomWorkflowAction interface) and a factory that will manage the creation of instances for this actions (based on (CustomWorkflowActionFactory). Create a plugin descriptor file (plugin.xml) to register the workflow action within a WCM extension point. 2. Deployment Package and deploy your code either as an EAR or JAR file. An EAR file will allow you to hot deploy your code (without restart) whereas JAR files require a server restart. 3. Configuration Create custom workflow actions in WCM in same way as any other actions.

245 of 439

To use custom workflow actions: 1. Developers create a new Dynamic Web project.

2. After the project is created, they add three classes: com.ibm.itso.redwiki.wcm.wf.Thumbnail - This is a utility class for scaling images. com.ibm.itso.redwiki.wcm.wf.CWFAction - This class holds the actual action. It should implement the CustomWorkflowAction interface. com.ibm.itso.redwiki.wcm.wf.CWFActionFactory - This class manages the creation of action instances. It should implement CustomWorkflowActionFactory interface.

246 of 439

Thumbnail.class
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: package com.ibm.itso.redwiki.wcm.wf; import java.awt.*; import java.awt.geom.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; public class Thumbnail { public static byte [] scale( byte [] data, int width, int height) { // Get system temp String tmp = System. getProperty ( "java.io.tmpdir" ); String src = tmp + "/" + new java.util.Date().getTime() + "_in.jpg" ; String dest = tmp + "/" + new java.util.Date().getTime() + "_out.jpg" ; // Temporay file names File srcFile = new File(src); File destFile = new File(dest); // Generate temporary file for input FileOutputStream fs; try { fs = new FileOutputStream(src); fs.write(data); // Convert byte array to buffered image BufferedImage imgSrc = ImageIO. read (srcFile); BufferedImage imgDest = new BufferedImage(width, height, BufferedImage. TYPE_INT_RGB ); Graphics2D g = imgDest.createGraphics(); AffineTransform at = AffineTransform. getScaleInstance ( ( double ) width / imgSrc.getWidth(), ( double ) height / imgSrc.getHeight()); g.drawRenderedImage(imgSrc, at); // Generate result image ImageIO. write (imgDest, "JPG" , destFile); InputStream is = new FileInputStream(destFile); // Convert result image to byte array long length = destFile.length(); // Will hold resulting byte array byte [] result = new byte [( int ) length]; if (length < Integer. MAX_VALUE ) { // Read in the bytes int offset = 0; int numRead = 0; while (offset < result. length && (numRead = is.read(result, offset, result. length - offset)) >= 0) { offset += numRead;

247 of 439

49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62:

} // Close the input stream and return bytes is.close(); } // Delete temporary files srcFile.delete(); destFile.delete(); return result; } catch (Exception e) { e.printStackTrace(); } return null ; } }

CWFAction.class
1: 2: package com.ibm.itso.redwiki.wcm.wf; 3: import java.util.Date; 4: import javax.naming.InitialContext; 5: import javax.naming.NamingException; 6: import com.ibm.workplace.wcm.api.Content; 7: import com.ibm.workplace.wcm.api.Document; 8: import com.ibm.workplace.wcm.api.ImageComponent; 9: import com.ibm.workplace.wcm.api.WebContentCustomWorkflowService; 10: import com.ibm.workplace.wcm.api.custom.CustomWorkflowAction; 11: import com.ibm.workplace.wcm.api.custom.CustomWorkflowActionResult; 12: import com.ibm.workplace.wcm.api.custom.Directive; 13: import com.ibm.workplace.wcm.api. custom .Directives; 14: import com.ibm.workplace.wcm.api.exceptions.AuthorizationException; 15: import com.ibm.workplace.wcm.api.exceptions.ComponentNotFoundException; 16: import com.ibm.workplace.wcm.api.exceptions.IllegalTypeChangeException; 17: import com.ibm.workplace.wcm.api.exceptions.OperationFailedException; 18: import com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException; 19: public class CWFAction implements CustomWorkflowAction { 20: public CustomWorkflowActionResult execute(Document arg0) { 21: Directive directive = Directives. CONTINUE ; 22: String message = "Action succesfully executed" ; 23: if (arg0 instanceof Content) { 24: // Get current image 25: try {

248 of 439

26: Content wcmItem = (Content) arg0; 27: // Get image element 28: ImageComponent bigImage = (ImageComponent) wcmItem 29: .getComponent( "Image" ); 30: // Check if there is an attached image 31: if (bigImage.getImageFileName()!= null ) { 32: // Get image bytes 33: byte [] arrImg = bigImage.getImage(); 34: // Scale it 35: byte [] arrImgTmb = Thumbnail. scale (arrImg, 100, 50); 36: // Load new image 37: ImageComponent thumbnail = (ImageComponent) wcmItem 38: .getComponent( "Thumbnail" ); 39: thumbnail.setImage( "tmb_" + bigImage.getImageFileName(), 40: arrImgTmb); 41: // Put new width and height 42: thumbnail.setWidth( "100" ); 43: thumbnail.setHeight( "50" ); 44: wcmItem.setComponent( "Thumbnail" , thumbnail); 45: } 46: } catch (ComponentNotFoundException e) { 47: // Dont rollback if a component is not found 48: directive = Directives. CONTINUE ; 49: message = "Image or thumbnail element not found" ; 50: } catch (AuthorizationException e) { 51: directive = Directives. ROLLBACK_DOCUMENT ; 52: e.printStackTrace(); 53: message = e.getMessage(); 54: } catch (PropertyRetrievalException e) { 55: directive = Directives. ROLLBACK_DOCUMENT ; 56: e.printStackTrace(); 57: message = e.getMessage(); 58: } catch (OperationFailedException e) { 59: directive = Directives. ROLLBACK_DOCUMENT ; 60: e.printStackTrace(); 61: message = e.getMessage(); 62: } catch (IllegalTypeChangeException e) { 63: directive = Directives. ROLLBACK_DOCUMENT ; 64: e.printStackTrace(); 65: message = e.getMessage(); 66: } 67: } 68: WebContentCustomWorkflowService webContentCustomWorkflowService = 69: null ; 70: try {

249 of 439

71: 72: 73: 74: 75: 76: ); 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91:

// Construct and inital Context InitialContext ctx = new InitialContext(); // Retrieve Custom Workflow Service webContentCustomWorkflowService = (WebContentCustomWorkflowService) ctx .lookup( "portal:service/wcm/WebContentCustomWorkflowService" } catch (NamingException ne) { // Exception retrieving Service ne.printStackTrace(); return null ; } // Create a result object CustomWorkflowActionResult result = webContentCustomWorkflowService .createResult(directive, message); return result; } public Date getExecuteDate(Document arg0) { return DATE_EXECUTE_NOW ; } }

Note: It is not necessary to save the current content item in the action. Directive. CONTINUE will do that for you.

CWFActionFactory.class
1: 2: package com.ibm.itso.redwiki.wcm.wf; 3: import java.util.Locale; 4: import com.ibm.workplace.wcm.api.Document; 5: import com.ibm.workplace.wcm.api.custom.CustomWorkflowAction; 6: import com.ibm.workplace.wcm.api.custom.CustomWorkflowActionFactory; 7: public class CWFActionFactory implements CustomWorkflowActionFactory { 8: public CustomWorkflowAction getAction(String arg0, Document 9: arg1) { 10: if (arg0.equalsIgnoreCase( "generate_thumbnail" )) { 11: return new CWFAction(); 12: } 13: return null ; 14: } 15: public String getActionDescription(Locale arg0, String arg1) { 16: return "Generates a thumbnail from existing content" ; 17: } 18: public String[] getActionNames() { 19: String names[]={ "generate_thumbnail" };

250 of 439

20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35:

return names; } public String getActionTitle(Locale arg0, String arg1) { if (arg1.equalsIgnoreCase( "generate_thumbnail" )) { return "generate_thumbnail" ; } return null ; } public String getName() { return "CWFActionFactory" ; } public String getTitle(Locale arg0) { return "ITSO WCM 6.1 Redwiki Custom Workflow Action Factory" ; } }

Finally, River Bend developers created the configuration file that registered the action in WCM by creating a new empty file under WEBINF, called plugin.xml with this content: 1: <?xml version="1.0" encoding="UTF-8"?> 2: <plugin id= "com.ibm.workplace.wcm.api.custom" name= "Sample Custom Workflow Action Factory" version= "1.0.0" provider-name= "IBM" > 3: <extension-point id= "CustomWorkflowActionFactory" name="CustomWorkflowActionFactory" /> 4: <extension point="com.ibm.workplace.wcm.api.custom.CustomWorkflowActionFactory" id= "SimpleCustomWorkflowActionFactory" > 5: <provider class= "com.ibm.itso.redwiki.wcm.wf.CWFActionFactory"/> 6: </extension> 7: </plugin>

Packaging and deployment


River Bend developers exported their code as an EAR file and deployed it to WCM using WebSphere Administrative Console. Note: When deploying your application you can use default settings in all steps but step 2 (Map modules to servers). In this step be sure to select the WebSphere_Portal server. With the custom action installed, it must be started. Tick the check box beside the new application and click the Start button. Once the application is started the console displayed a message showing the new action was avalilable: 00000c38 ExtensionPoint I CWXRS0034I: Extension com.ibm.workplace.wcm.api.custom.SimpleCustomWorkflowActionFactory connected with Extension Point com.ibm.workplace.wcm.api.custom.CustomWorkflowActionFactory

251 of 439

Configuration
To make the action available for content creators, River Bend developers created a custom workflow action in the same way than any other action. From the Library Explorer interface, using the New button, Workflow > Actions > Custom Action) with the following configuration:

252 of 439

Select the custom action:

3.3.3. Using collaborative editing tools - Versioning, link management, and locks
This section describes the collaborative editing tools features including versioning, link management, and locks.

Using versions
Content authors, and site designers can follow changes that have occurred to specific items using version control, for example changes to a content item, or updates to an Authoring Template. Additionally, site administrators can also employ version control at a library level. Items that have already been versioned can be saved and restored by Date range or identified Label.

Library versioning
Using library versioning, site administrators can group the items within a library by Label or Date & Time. River Bend administrators use this functionality to create a baseline of the first version of the website as shown in the following figure:

1. Open the Administration page, and navigate to Portal Content and then Web Content Libraries. 2. Click on the button (Additional tasks) for the River Bend library. 3. Click on the button to create a Version Label.

253 of 439

The following figure shows the baseline version of the River Bend library.

The library version is created in the background. You see the status in the Additional Tasks page after applying a label to all the current versioned items in the library as follows:

Additionally, further detail is provided by clicking on the button to view a report of the versioning status (system report for Label All Items) as shown below.

254 of 439

If something goes wrong, the River Bend administrators can rollback to previous versions of Items, selected by Label. Additionally, if needed, site administrators can specify default restore options for non-existing items as shown below.

255 of 439

Note: A library cannot be restored while any Items are currently locked or checked out. Before restoring a library, as an administrator you must view all published Items in the library, unlocking any items marked as checked out or locked.

Item versioning
The behaviour you see when using the versioning capabilities in the Library Explorer can be configured at a global level. You define and manage these authoring options in the WCM WCMConfigService service using the IBM WebSphere Application Server administration console. Global versioning strategy is defined in WCMConfigService. These options are available: versioningStrategy.Default = always | never | manual versioningStrategy.AuthoringTemplate = always | never | manual versioningStrategy.Component = always | never | manual versioningStrategy.Content = always | never | manual versioningStrategy.PresentationTemplate = always | never | manual versioningStrategy.Site = always | never | manual versioningStrategy.Taxonomy = always | never | manual versioningStrategy.Workflow = always | never | manual

256 of 439

The following values specify version control settings for the WCMConfigService described above: always - A version is saved every time a non-workflowed item is saved, or every time a workflowed item is published. manual - Versions will only be saved when a user with at least editor access chooses to save a version. This setting causes the following changes in the interface: The Save Version button is available in the read mode of non-workflowed items and in workflowed items in the published state. The Save and Version button is available in the edit mode of nonworkflowed items and in workflowed items in the published state. never - Disable version control for an item type.

If a version control strategy is not defined for an item type, then the version control strategy specified in by the versioningStrategy.Default property is used. Again the values above should be used to provide a default if required.

Item versioning features for the River Bend website


With the development phase finished, the River Bend administrators decided to disable versioning for all items other than Content in order to maximize performance. To achieve this goal, they set the following values for WCMConfigService properties: versioningStrategy.Default = never versioningStrategy.AuthoringTemplate = never versioningStrategy.Component = never versioningStrategy.Content = manual versioningStrategy.PresentationTemplate = never versioningStrategy.Site = never versioningStrategy.Taxonomy = never versioningStrategy.Workflow = never Versioning of content items can be configured in two separate places to address differing site compliance requirements. At River Bend there is a need to provide a version strategy using workflow, this is achieved by adding a Version Action to a Workflow Stage as show. Alternatively as shown below, the behavior of versions can be applied in the Item Properties section of an Authoring Template.

Setting Configured default will use the version actions in the versioning strategy properties we set previously.

257 of 439

Note: When you define your workflow stage, you must put Version actions after a Publishing action. You will be prompted if this is missed.

Links management
The View References feature shown below helps authors to keep track of and manage all the links between items.

The River Bend authors can view the references From the Home default content item to other items within the site, additionally using the Show: drop down box authors can see references to this item. The feature is very useful to understand the impact a change, or deletion might have on other items in the site.

258 of 439

Locks
As River Bend authors contribute their content into the site, sometime they may find their items are locked by other users. This happens either because they are being edited by another user who has access, or a draft item has been created. The following figure shows an item being locked by another user.

Working with locked items


When a user is editing an item, the item is locked from other users. This means other users are unable to edit the item until the current user closes the item that they are editing. A lock icon ( ) is displayed against items that are currently locked. Administrators can lock and unlock items by selecting them and clicking either the Lock or Unlock button. Locking: The locking of Site Areas, Taxonomies, and Categories is configurable and is not enabled by default. When locking is enabled, authors cannot create any children under the locked site area. This only applies to items that are located one level below a locked parent. When a new draft of a published item is created, a check mark is displayed next to the published item indicating that no other user can create a draft until the current draft progresses through a workflow and its state changes to published.

259 of 439

3.3.4. Previewing content


During the content creation process, the River Bend authors want to see how content will be displayed on the rendered site before submitting a draft. IBM Web Content Manager (WCM) provides authors two options (via the Library Explorer user interface) to preview content before it is published: Preview content in a web content portal page Preview content in a web page

For site designers, WCM provides the ability to preview other items such as templates, site areas, and components. Previewing options are controlled by the River Bend administrators using the Library Explorer preference settings. Select Allow Authors to preview content in local portal pages. Select specific portal pages from the list. The selected portal pages must contain a Web Content Viewer portlet. To allow users to preview pages using the WCM servlet engine (as a stand-alone web page), select the Preview content in a Web page, option. Note: When using a rendering portlet to preview content, the rendering portlet should be configured to receive links from "Other Portlets and This Portlet". Otherwise the preview will not work. The River Bend website is built using both content from WCM and Portal components, as such authors preview content using Portal pages.

Previewing content on a portal page


For Portal based websites, WCM provides authors the option to preview content in any portal page defined by the administrator. After clicking the Preview button (shown in the following figure), River Bend authors can choose to preview content as a portal page. The selected page is displayed in the preview portal page as shown in the figure below.

260 of 439

Note: Portal administrators can define several pages for previewing content. Those pages can have different navigation themes to allow authors to preview how content will display in different sites such as River Bend's public website and River Bend's intranet.

Previewing content on its own page


Previewing content on its own page is the default option for nonportal-based Web sites such as the initial River Bend site. Content is previewed in a pop-up window in a new browser window. Note: In order for the preview option to work properly, you must allow browser pop-ups for your server address. To preview content items River Bend authors have two options: Select the content element from any of the views that are available in the authoring environment and click the Preview button. The following figure shows preview from a view list.

261 of 439

Open the content item directly in read mode, click the Preview button. The following figure shows preview from a piece of content.

262 of 439

If there is more than one previewing option, the browser shows a dialog box to allow the author to select where the content should be previewed. See the following figure.

If the author chooses Preview as a Web page, a new browser window that shows a preview of how the selected content will be displayed. Note: If the styling and formatting of the item being previewed is not reference by that item directly, they styling will be missing. This occurs for example when a content item that is previewed as a webpage isolation, but is actually published through a portal page normally. In this situation the styling and formatting references to CSS will be in the Head section of the Theme.

3.4. Personalizing your site


WebSphere Portal implements rule-based content delivery through a feature called personalization . By using personalization, you can customize the content that a website shows automatically for each user. Personalization can recognize a specific user based on a profile. It can also determine the characteristics of a user based on previous purchases, products, or pages viewed and then select content that is appropriate for that profile. In this section, we discuss the following topics Overview of the personalization feature Creating a personalization rule Configuring the personalized list portal Creating the personalization component

In the case of River Bend, a simple personalization rule and example is implemented to better illustrate the concept. The personalization rule that is implemented is based on dates. If the date the site is accessed is within a range of defined "summer dates", then the home page illustrates a summer-based image of a refreshing iced coffee drink as shown in the following figure. If the date the site is accessed is within a range of defined "winter dates", then the home page illustrates a winter-based image of a hot coffee drink.

263 of 439

Overview of the personalization feature


You can find complete information about the rich set of capabilities that the personalization feature provides in the WebSphere Portal information center at the following address: http://infolib.lotus.com/resources/portal/7.0.0/doc/en_us/pt700abd001/html-wrapper.html A portlet can have a designated spot for rule-based content. For each spot, a rule is selected. All rules are created based on the resource attribute definition. These attributes are defined in a resource collection . The resource collection is a set of Java classes that retrieve content requested by the rule from the defined repository source. The back-end source can be LDAP or SQL databases, the portal Java Content Repository (JCR), Virtual Member Manager (VMM), or any other custom collection that is coded for the personalization API. The JCR resource collection is provided with WebSphere Portal as well as VMM. Wizards are available in Rational Application Developer 7 that guide developers in creating classes for other LDAP and relational database resources. A guide of how to create these resources is described fully in the WebSphere Portal Information Center. Three types of rules are used to target select content to a certain group of users: Select rule - Chooses content based on the attributes of the content. For example, the GoldOffers rule selects products whose retail price is greater than a certain amount. With IBM Web Content Manager content, you can also select content with a specific category. For example, a NonManager rule gets content that is created with the HRNews template that has a category of non-manager. Profiler rule - Profiles based on user attributes, date, and any other information. This rule is used to decide which actions to take and which policies to use. It gives a name to a set of conditions. For example, a user is profiled as a premium user if the amount of the user's mortgage is over a certain amount. Another example is if a user's order amount is over a certain amount, then that user is profiled as a gold user . In addition, an employee can be profiled as non-management if the employee's isManager attribute is set to false.

264 of 439

Binding rule - Ties the profile and select rules together. Premium users see PremiumOffers, gold customers see GoldOffers, and non-manager employees see NonManagement news. You do not have to coordinate the naming of the profile with the select rule name. However, this convention helps when creating the binding rule.

Any of these rules can be tied to a content spot. To enable your environment to construct these rules, you must install and configure personalization in Web Content Manager.

Creating a personalization rule


This section discusses how to create a personalization rule within the context of the River Bend site. To create a personalization rule, we write a select rule that retrieves all the content from River Bend Site Area that is created using the General authoring template: 1. Log in to WebSphere Portal. 2. Navigate to the Personalization Workspace as shown in the figure below.

3. 4. 5. 6. 7.
8.

Select New > Rule. Enter a name for the new rule (for example, Get WCM Content). Leave rule type to be Select Action. Select Web Content as the Resource Collection. Select River Bend as the Location (site area). Select the Authoring Template Locations from the Personalization Picker and the resulting rule is shown in the figure below.

265 of 439

9. Click Save. 10. To show the content returned from this rule, select the Preview tab, as shown in the figure below.

This personalization rule can now be displayed in a Personalization List Portlet, referenced in an WCM component, or included within a Content Spot on a Portal page.

Configuring the personalized list portal


The Personalized List Portlet is installed with WebSphere Portal and can be added to any Portal page. A portal page is configured within the Personalization page with this list Portlet already on it when WebSphere Portal is installed. It has many configuration options that enable you to use a rule to show content quickly.

266 of 439

There are two configuration modes: One that configures the Spot information. One that configures the Display Options.

In order for these options to be displayed: 1. On the Personalized List Portlet Menu, select Configure and the following screen is displayed.

267 of 439

2. Click the drop down that says Nothing Selected and you are provided with the following option, as shown in the figure below.

3. Pick the Select content rule that you had created earlier and the following screen is displayed, as shown in the figure below.

To configure the display settings for Personalized List Portlet, do the following: 1. Click Display Options. 2. Choose the Fixed Title attribute for the Title Attribute and choose the Fixed Description attribute for the Detail Attribute. 3. Select 'Locations' for the Categorization Attribute. This groups the content under the site area structure. 4. Click OK .

268 of 439

The following result is displayed, as shown in the figure below.

When you select a title, you get the detail attribute displayed for that title. Note that this list does not use the site area and presentation template to render the content. Instead, it uses just the attribute that you defined in the Portlet configuration. Only Select rule, Binding rule, content spots and custom JSP that has a content spot can be verified using Personalized List portlet. Profiler rules cannot be tested using this portlet.

Creating the personalization component


For the River Bend website example, we will personalize an image in the homepage. This image will be changed automatically based on the season we are currently in. There will be two images, a winter image and a summer image. In the example used, we show the Summer Drink image. Using personalization rules, the content of the beverage of the current season will be

269 of 439

selected and the image will be displayed. In order for us to create the Personalization component, we need to do the following steps: 1. 2. 3. 4. Create select action rules. Create profiler rule. Create binding rule. Create Personalization Component.

For more information, refer to 3.2.7.5 Creating the personalization component.

3.4.1. Using campaigns


When implementing a personalization solution, it is important to understand the relationship of the personalization engine to the content management systems and portals. This section covers using campaigns in your website.

Introduction to Portal Personalization Recommendation Engine


IBM Web Content Manager (WCM) uses the Portal Personalization Recommendation Engine, which allow business users to configure the behavior of the system by using business rules or analyzing website user behavior in real time to make recommendations based on click-through patterns, purchase history, and preference matching. Portal Personalization provides automatic customization of portal based websites for individual users and user groups. The Portal Personalization engine can be used for the following tasks: Recognize a specific user, based on a profile or determine characteristics of a user based on previous purchases, products, pages viewed, or others. Selects content that is appropriate for each profile, For example, if a person has a high salary range, the personalization engine can be configured to retrieve information about a commercial website's premium products. If an individual belongs to a particular geographic region, content specific to that region may be targeted to the individual. Assembled pages with the proper personalized information so the user sees her personalized page.

The Portal Personalization engine (often referred as PZN) is composed of five components: Personalization browser Rules engine LikeMinds recommendation engine Resource engine Logging framework

270 of 439

Personalization browser
The Personalization user interface is a portal based application where authorized users: Register resource collections Author rules, campaigns, and content spots Map rules into content spots for a particular campaign

Rules engine
The rules engine evaluates rules created in the Personalization browser. In a portal environment, there are different ways to invoke rules. Personalization rules may be invoked through the personalized list portlet and presented as a list of text and links. The WCM personalization components allow you to invoke a selection rule or content spot and format the results by using WCM tags. Hide rules associated with pages or portlets through portal administration are automatically triggered when a user navigates a portal page.

LikeMinds recommendation engine


Personalization contains a dynamic recommendation system based on LikeMinds. LikeMinds analyzes user interactions that occur on your website and generates real time predictions and recommendations to your website users.

Resource engine
The resource engine resolves the queries produced by rules into content pieces to be returned. Content for personalization is created using whatever content management tool you choose, or may come from an LDAP or any other database. Content is accessed via a set of Resource Collection classes.

271 of 439

Logging framework
The logging framework is used to record information about website usage to the feedback database and the recommendation engine. It is entirely up to the site developers to decide what information is logged.

Create a personalization campaign


A personalization campaign is a set of business rules that allow non-technical users to decide what content should be displayed in a content spot of a web portal during a period of time. This section shows you an example extracted from the article, Personalization , from the Redbooks Wiki: "Creating External websites with WebSphere Portal" where you can find a detailed tutorial to create two different scenarios: A campaign for recommended products that runs for a fixed duration in the "Recommended products" portlet in the home page. How to show personalized content based on location of the registered users.

Recommended products
In this kind of campaign, there are two sets of content related to coffee and tea products. Marketing department wants to run a campaign in the home page to promote coffee and tea equally by splitting coffee and tea related information equally among visitors. On first request, the view of the portlet is shown by the left figure (first recommendation). If the user logs in again, the view of the portlet changes to show the second campaign item shown on the right figure (second recommendation).

272 of 439

First recommendation

Second recommendation

Their display needs to be divided in an equal ratio. Therefore, for one request to the website, content 1 is displayed and for the next request, content 2 is displayed.

Personalized content
This second scenario shows personalized content based on location of the registered users. Based on a location attribute filled in on the registration page of the registered user, the location specific content is delivered in the "Campaign" portlet in the homepage. Here the left figure (Spain content) shows the portlet seen by the user from Spain. Assume we sign up a new user with CountryName attribute as India. Upon logging in by that user, the right figure (India content ) shows the portlet by the Indian user.

273 of 439

Spain content

India content

3.5. Internationalization
When addressing the requirements to deliver content across multiple languages it is important not only to focus upon the resulting content itself, but also the authoring of that content. Ensuring the content authoring environment is available in the local language is an important step to removing any barriers to the content creation process. To address both of these requirements typically seen within organizations IBM Web Content Manager (WCM) provides the following: Text Providers Multi-lingual Solution (MLS)

274 of 439

3.5.1. Text Providers


Text providers are used to deliver localized text (i.e. text in the local users language) that can be used within web content item forms. Within the scenario of internationalisation of web content, a text provider can be used to localize the field labels or help text within an authoring template so that each user sees the labels or help text in their own language. Text providers are deployed into IBM Web Content Manager as a custom-plugin. This requires a developer to implement the java interface com.ibm.workplace.wcm.api.plugin.textprovider.TextProvider and specific methods: public String getProviderName() {} This method returns the unique name of the text provider. public String getString(String key, Locale displayLocale) {} This method returns some translated text, given a key identifying the message and a locale. public Collection getProviderKeys() {} This method returns a list of keys used when accessing the text provider. These keys are displayed in the authoring UI when a user is configuring the text provider. public boolean isShownInAuthoringUI() {} This method allows you to prevent your text provider from appearing in the authoring UI.

See the javadoc for further information. In addition to the WCM API .textprovoider interface, the methods inherited from com.ibm.portal.Localized must also be implemented. public String getTitle(Locale displayLocale) {} This method returns the title for the text provider that will be used to allow selection of the text provider. public ListModel getLocales() This method returns a list of locales that are supported by this text provider. public String getDescription(Locale p_arg0) This method returns a description of the text provider.

Further information for developing text providers can be found on the IBM Portal Wiki.

3.5.2. Multi-lingual solution (MLS)


To address the differing requirements for delivering multi-lingual web content, the MLS has been developed as an add-in to the base level IBM Web Contenet Manager (Version 7 only). The solution includes a whitepaper, Multilingual Site Management with Lotus Web Content Management, that describes the framework for managing a multilingual site, the deployment and configuration of the extensions, and examples of their use. The MLS solution addresses the typical requirements to have:

275 of 439

Workflows which coordinate the lifecycle of content items and their translations. Authoring template extensions to simplify the creation and navigation between translated content items. Site template tools for self-service creation of new sites. Notification system which informs content authors and translators when items need translating and retranslating due to changes to one of the translations. A recommendation capability which informs site owners when new content items are created and enables them to include the content item on their site at the click of a button.

Further information on the MLS solution can be found on the IBM Greenhouse Business Solutions Catalogue.

3.6. Search - Integrating with portal search


In this section, we discuss how to integrate IBM Web Content Manager (WCM) with your portal search functionality. We discuss how to crawl the WCM content, then how to display those results in the portal search center, and in a WCM search component.

3.6.1. Creating the WCM search collection


In order for the portal search crawler to index WCM content, we need to create the WCM search collection, and create the content source so that it can crawl the WCM content in the library.

Creating the search collection


To create the search collection: 1. Navigate to the Portal Administration page and then navigate to Search Administration > Manage Search. 2. Click on the Collections from All Services and then click the New Collection button.

276 of 439

3. Enter in RiverbendCollection for the location, name, and description fields. Ensure the Summarizer is set to Automatic. See the setting below. Click OK. Note: For the location field, if you do not give a full path, portal will store the data in a predetermined directory (wp_profile/PortalServer/collections).

4.

Click on the RiverbendCollection name to go into the details. There are no content sources yet. Click on New Content Source as shown in the figure below.

277 of 439

5. When creating the new content source, in the drop down select WCM site.

6. In the content source fields, enter the following information: Content Source Name: TopLevelSite Collect documents linked from this URL: http://host:port/seedlist/myserver?SeedlistId=Riverbend/Riverbend&Source=com.ibm .workplace.wcm.plugins.seedlist.retriever.WCMRetrieverFactory&Action=GetDocume nts Level of links to follow: 5 levels Number of documents to collect: unlimited Force complete crawl: checked Stop fetching a document after(sec): 20 See figure below for the setting. Note regarding URL: You are entering in a URL to the seedlist capability of the portal server. When you pass the SeedlistId, you tell the seedlist to get all the content under the Riverbend library in the Riverbend SiteArea. Finally, the source for the seedlist is passed to tell the server to use the WCM seedlist generation capabilities.

278 of 439

7. Leave the rest of the values. Click on the Security tab. In the Define Security Realm, enter in the admin username and password. For the Host Name, enter the host name for your portal. Click the Create button.

8. After creating the security realm, click on the Create button at the bottom of the form.

279 of 439

Forcing the search crawl


Now that the search collection is created, we should force a crawl so that the WCM content in the library can be indexed. After creating the content source, you will be back in the list of content sources for the collection. Click on the crawl icon to force a crawl.

Once the crawl is complete, we will still have to wait until the indexed documents are available. Here's an example of a search collection that has available content indexed:

Creating the WCM search result landing pages


Now that WCM content is indexed within the portal search collection, it is possible to get WCM results from portal searches. However, if there are no content pages mapped to the site structure of the Riverbend site, then all of the search results will be opened in the WCM servlet. This means that the portal themes and navigation structure will be unavailable. In order for the results to be displayed within portlets in the portal framework, Content pages have to be created for the links to be resolved on. Now, for the Riverbend example, there will already be content pages mapped to the

280 of 439

Riverbend site framework. However, we can show how the pages will be created in the general case.

Creating the content page


To create the content page: 1. Navigate to the Portal Administration > Portal User Interface > Manage Pages. 2. Navigate to where you want to deploy the page. 3. Click on the New Page from... button.

4.

In the form, for the title and friendly URL name, enter RiverbendSearchResults, From the Page Template drop down, select Sample Web Content Page Template. This will cause a WCM JSR286 portlet to be automatically deployed on the page. In the Web Content Mappings, choose the top level Riverbend site area in the Riverbend library.

281 of 439

5. Now that the page has been created, all that is left is to change the portlet configuration to allow the portlet to receive links. Navigate to the page that you created, and then in the portlet, click on the Edit Shared Settings.

6.

Down to the bottom of the page, there is a section for Advanced Options. Set the Receive links from to Other portlets and this portlet. Then click OK.

This page will render content for any results under the Riverbend site area. In a real world scenario, you would have more pages with more mappings, but in this example we'll use the top level page as a catch all.

Rendering search center results


Rendering results from the search center is simple once some content page has been mapped to the WCM Site area. Either navigate to the search center, or issue a search in the upper right hand corner of the portal pages. Here is an example of a search for Jasmine Tea:

Note that although there are two results that look the same, they are actually to two

282 of 439

different results because of the path to the item. When we click on the search result, because we have the content page mapped and the rendering portlet deployed to it, the result will be displayed on that page. The URL becomes: http://host:port/wps/myportal/RiverbendSearchResults/Home/Products/Tea/Jasmine%20 Tea/!ut/p/b1/hc7RToMwFAbgZ_EB5By6FthlGQRwUAcFR3uzoDgDk83IotKnHxpvpfuT778_wENilHmODY6BGrQxaje2nO3enYvH5n7ew4wbXv2xyjiDuYbOTK50VOMKGwBRXNSs0KrxzH_0v0D1lFPKZui uilEcOEx1WxzBcLzOkvGNCzcC9PsKghBrpTvbTW2IOpuhNbmQ4TrIXayyrKQviWpQhyVppi0Bnc6spw6_70XCS 9Wo6t8GmfSgqnwcqS8cO7kB3j4P1-TRYaDHbc8kS6fys5zJiwzYGEZ-GZxj03R72Iu9oDcXFerkvw!!/dl4/d5/L2dBISEvZ0FBIS9nQSEh/ This shows it being mapped to the proper portal page that we created. Now, if we had not created the page mapping, this search result would have been opened in the WCM servlet instead of to the portal. This is the reason that we want to make the page mappings, assuming we want the content to be displayed within the portal.

Rendering WCM search component results


In addition to using the search center portlet to display WCM results, a WCM search component can also be used to display WCM search results. There are several reasons you may decide to do this, some reasons: Only WCM results will be displayed, meaning any non WCM assets in the search collection will be filtered out when using WCM search component. Full control over the HTML display of the results. Integration within a WCM site being rendered from the servlet.

To accomplish this, we have to create a piece of content that will hold both the search form and the results of the search. When a search is submitted the form will submit to the page for the results, which the form is also deployed to.

Creating the Authoring Template


First, an authoring template for the content is necessary. Create an authoring template named "at_search", and use manage elements to add the following 3 elements: query_form - a Component Reference search_results - a Component Reference text - a Text Componentck

283 of 439

Save and close the new authoring template.

Creating the presentation template


Next we need to set up the presentation template to display the elements. Create a new presentation template named "pt_Search", and in the HTML put the following: 1: 2: Search Page 3: 4: 5: 6: <!-- Text --> 7: 8: <p>[Element context="current" type="content" key="text"]</p> 9: 10: 11: 12: <!-- Component Reference --> 13: 14: <p>[Element context="current" type="content" key="query_form"]</p> 15: 16: 17: 18: <!-- Component Reference --> 19: 20: <p>[Element context="current" type="content" key="search_results"]</p> 21: 22:

This code renders the three elements that were added to the authoring template in the previous step. Save and close the new presentation template.

284 of 439

Creating the WCM search form


Now, we need to create the HTML component that will hold the html for the search form. Create a new HTML component named "HTML - Adv Search form", and enter the following HTML: 1: 2: <table> 3: 4: <tr> 5: 6: <td>Search by type: </td> 7: 8: <td> 9: 10: <form action='[PathCmpnt type="servlet"]/RiverBend/Search/Results' method="post"> 11: 12: <input type="text" name="search_query" /> 13: 14: <select name="search_authoringtemplate"> 15: 16: <option value="">Select one ...</option> 17: 18: <option value="News">News</option> 19: 20: <option value="Products">Products</option> 21: 22: <option value="Locations">Locations</option> 23: 24: </select> 25: 26: <input type="submit" value="Search" /> 27: 28: </form> 29: 30: </td> 31: 32: </tr> 33: 34: </table> 35: 36: What the code does is setting up the form to submit to the RiverBend/Search/Results content (which we will create later), and puts the search_query in the form. The search_query is what gets processed by the WCM Search component as the search. We also limit results to News, Products, or Locations baed on the search_authoringtemplate field. This means that when the search is performed, we limit results based on the content's authoring template.

285 of 439

Creating the WCM search component


Next, we need the WCM search component to be created in order to display the search results. Create a new search component named "Search-Search Results". In the search options, select the RiverbendCollection for the Search collection: field. Also, use 5 for the results per page, as we will use a page navigation to page through the search results.

In the header field, enter the following:

1: 2: 3:

[Component name="./search-result-navigation"] <table>

We just reference the paging component here.

286 of 439

In the results field, enter the following: 1: 2: <tr> 3: 4: <td> 5: 6: [AttributeResource attributeName="nameLink" separator=","] 7: 8: ([AttributeResource attributeName="relevance" separator=","]) 9: 10: <br> 11: 12: [AttributeResource attributeName="summary" separator=","] 13: 14: 15: 16: </td> 17: 18: </tr> 19: 20:

In this code, we display the link to the item, its relevance, and a summary of the result. For the footer: 1: </table>

For the Separator: 1: 2: 3: 4: 5: 6: 7: 8:

<tr> <td bgcolor="#FFFAA" colspand="2" /> </tr>

287 of 439

Creating the paging component


For the results to be paged, we create a simple paging component. Create a new page navigation element named "Search-result-navigation". Use the following as a guide for the paging design for shuffle, paging, jump to page, and page size values to use.

Use the following as the guide for the value of the design elements of the paging component:

288 of 439

And finally, for the jump to and page size control.

Creating the necessary content and site framework


Now that the pieces are in place for the search components, all we have to do is create the content and site area to hold them. First, create a new site area in your Riverbend library. Name it "Search", and map the presentation and authoring template to the site area that you created.

Save and close the site area. Secondly, create a new piece of content. Select the at_Search authoring template, name the content "Results", For the Query Form item, select the HTML - Adv Search form component. For the Search Results, select the Search - Search Results component. In

289 of 439

the text field, enter "Please select your search mode and click the button":

Choose a workflow for your content, save and publish the content. As a last step, go back to the Search site area, and set this new content as the default content for the site area.

Performing the search within the WCM search component


The easiest way to see the search in action is to preview the Results content. Click on the preview button, and the content will be displayed. Enter Tea in the search by type, and products in the drop down.

290 of 439

Click on the Search button, and the results will be displayed.

Note: The results that are displayed have URLs which will bring you to the content within the portal if a page is mapped as in the above documentation, or stay within the servlet if you do not. Just like the portal search center portlet, but this guarantees only WCM results.

Conclusion
In this section, we discussed some different ways in which you can get your WCM content to be indexed in the portal search, and to present the WCM search results within either the portal search center, or a WCM search component. Also, we discussed setting up content page mappings to act as landing pages for the WCM search results once they are retrieved.

291 of 439

Part 4. Expanding Web Content Manager environment


Part 4 covers the following topics: 4.1 Personalize the authoring tools Web content management systems are collaborative systems where many different authors and reviewers join efforts to build together a web site. This section describes how to personalize the authoring tools with WCM. 4.2 Integrating with other systems This section describes the integration options of IBM Web Content Manager with third party applications including Enterprise Content Management (ECM) systems and web analytics solutions. 4.3 Programming The IBM Web Content Manager API is focused on processing the content programmatically. This section provides an overview of the WCM API, links to the API documentation and Javadoc, and an introduction to the new API features in WCM 7.0. 4.4 Social media support Social capabilities are a key component of a successful content based portal. WCM includes a powerful set of social capabilities that allow site designers to create an engaging experience by incorporating features such as blog, wikis, tag clouds, ratings or social toolbars without investing a lot of time in development. This section covers social media features supported in WCM. 4.5 Multilingual site management The IBM Web Content Manager Multilingual Solution (MLS) is a set of extensions to IBM Web Content Manager (WCM) that make it easier to build, maintain and deliver WCM sites in multiple languages. This section briefly introduces multilingual site management and provides links to the existing documentation for more information.

4.1. Personalize the authoring tools


Web content management systems are collaborative systems where many different authors and reviewers join efforts to build together a web site. As in any creative process, it is important to maximize the productivity users can get from the system by reducing the number of errors and being sure the information is easy to find and ready to be used. If you provide content authors with the right tools, they can do things faster and better. IBM Web Content Manager (WCM) provides many extension points that allow site designers to provide a tailored authoring experience with wizards and shortcuts for the most frequent tasks. This section describes how to personalize the authoring tools with WCM.

4.1.1. Inline editing

292 of 439

IBM Web Content Manager enables contributors and editors to access the most common authoring functions directly from a rendered site. Some examples are: create and edit content items, approve, reject or delete the content item displayed in a Web page. Inline editing improves the usability of the authoring functions by limiting the number of clicks and navigational actions needed to complete a task in the system. Inline editing is enabled by using authoring tools components, which are regular components that can be part of presentation templates, menu element designs, and navigator element designs. The following figure shows an inline editing dialog of a content item.

When a user clicks an inline action, the Web Content Viewer portlet either launches a modal dialog window that opens from the current page (as shown in the above figure) or redirects the user to another portal page that contains the authoring portlet. This behavior can be customized in the authoring tools element design as is specified in the product documentation:
Link to authoring tools reference

Sample scenario
To increase productivity, River Bend designers added an authoring tool component to every presentation template. Thus, when an author accesses an existing content item, a quick menu is displayed (as shown in the following figure) for the author to edit and create new content.

293 of 439

The author only needs to click Edit to access to the current content item in edit mode as shown in the following figure.

The Authoring tool component creation is a simple process: River Bend designers only need to specify the HTML code they want for the action buttons as shown in the following block of code. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: <Placeholder tag="namelink"/> <Placeholder tag="namelink" format="tag"/> <a href="<Placeholder tag="href"/>"> <Placeholder tag="name"/> </a> <a href="<Placeholder tag="href" format="tag"/>"> <Placeholder tag="name"/> </a>

Several options, such as the authoring template or the site area for new content, are available for the different authoring tools.

Remote actions
IBM Web Content Manager provides a REST like interface to invoke most of the authoring functions by calling specific URL patterns. Consider the following examples of remote action uses: Create content by using a basic HTML form and submitting it against IBM Web Content Manager.

294 of 439

Create your own wizards to accelerate the content creation process. Embed authoring actions in feeds to provide access for open, edit, approve, decline, or delete items actions. Create shortcut for the most used views in the authoring portlet based on user roles.

You can find a list of all available remote actions in the product documentation in this address:
Link to remote actions reference

Sample scenario
To increase productivity, the River Bend designers will create a launch page with shortcuts for several authoring functions by using remote actions with these URL patterns: Create a new item: 1: /wps/myportal/wcmAuthoring?wcmAuthoringAction=new&type=com.i bm.workplace.wcm.api.WCM_Content&wcmfield.content.title=<tit le>&atid=<authoring template id>

Open a content item: 1: /wps/myportal/wcmAuthoring?wcmAuthoringAction=read&docid=com .ibm.workplace.wcm.api.WCM_Content/<content id> Edit a content item: 1: /wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com. ibm.workplace.wcm.api.WCM_Content/<content id>
Approve a content item:

1: /wps/myportal/wcmAuthoring?wcmAuthoringAction=approve&docid=c om.ibm.workplace.wcm.api.WCM_Content/<content id>

4.1.2. Launching JSP


The Web Content Manager authoring portlet allows you to configure an alternative launch page to the default user interface. A custom launch page can either be a JSP or HTML file. To simplify the maintenance of your IBM Web Content Manager environment, we recommend packaging your JSP extensions in a separate WAR file and reference them using this format: <WAR URL contextPath>;<jspPath>

295 of 439

By combining API calls and remote actions in launch JSPs, you can create shortcuts for views and functions with the authoring portlet user interface.

Example: River Bend launch page


River Bend wants to help its authors to be productive by reducing the navigation steps they need to perform simple tasks. To do this, designers found a better solution was to create a launch JSP that provides direct access to the following tasks: A shortcut to create a content element using any of the authoring templates available for users Listing all the drafts created by the current user with contextual links for opening, editing, or submitting for approval Listing all the content pending for approval with contextual links for opening, approving, or declining it Listing all the published content with contextual links for opening it Opening the IBM Web Content Manager main view

To develop this custom page, River Bend designers use these steps: 1. Create a JSP file with the content described later. The file is customLaunchPage.jsp and package it in a WAR file under the folder: /jsp/html 2. Deploy the WAR file through WebSphere Administrative Console under the URL contextPath: /RB_WCM_extensions 3. Configure the IBM Web Content Manager Authoring Portlet to launch the new page instead the default workspace: RB_WCM_extensions;/jsp/html/customLaunchPage.jsp

296 of 439

Sample code
The sample code is presented in six sections.

Section 1: Page imports, common Java objects initialization and common JavaScript functions
This section imports required Java packages and creates a WCM workspace to be used throughout the rest of the code. 1: <%@page import="com.ibm.workplace.wcm.api.*, 2: com.ibm.workplace.wcm.api.exceptions.*" %> 3: <% Repository repository = WCM_API.getRepository(); 4: Workspace workspace = repository.getWorkspace(request.getUserPrincipal()); 5: 6: // Set current document Library 7: workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("Riv erBend")); 8: %> 9: 10: <script> 11: function display(id) { 12: status=document.getElementById(id).style.display; 13: if (status=="none") { 14: status=document.getElementById(id).style.display = "block"; 15: } else { 16: status=document.getElementById(id).style.display = "none"; 17: } 18: } 19: </script> 20: <h3>Select a task:</h3>

297 of 439

Section 2: Quick content creation form


First, a JavaScript function is created to help compose direct action URLs for content creation. Then, an API call retrieve is available for authoring templates for the current user to compose a select list with them. 1: <h4><a href="javascript:display('create')">Create Content</a></h4> 2: <div id="create" style="display:block"> 3: <script> 4: function createContent(){ 5: atid=document.getElementById('atid').value; 6: contentName=document.getElementById('contentName').value; 7: 8: document.location.href='?wcmAuthoringAction=new&type=com.ibm.workplac e.wcm.api.WCM_Content&atid=' + atid + '&wcmfield.content.name=' + contentName; 9: } 10: </script> 11: Authoring template: 12: <select name="atid" id="atid"> 13: <% 14: 15: // Get all the authoring templates 16: DocumentIdIterator authoringTemplates = 17: workspace.findByType(DocumentTypes.AuthoringTemplate); 18: while (authoringTemplates.hasNext()){ 19: DocumentId authId = (DocumentId) authoringTemplates.next(); 20: out.println("<option value='" + authId.getId() + "'>"+authId.getName()+"</option>"); 21: } 22: %> 23: </select> 24: &nbsp; New item name: <input type="text" name="contentName" id="contentName"/> <input type="button" onClick="createContent()" value="Create"/> 25: </div>

298 of 439

Section 3: My Drafts
An API call retrieves the workflow stage called Draft from the River Bend library. This stage is used together with the current user name to perform a search on all the library content where the user has the author role. Direct actions are composed for open, edit, and approve. 1: <h4><a href="javascript:display('drafts')">My Drafts</a></h4> 2: <div id="drafts" style="display:block"> 3: <table > 4: <% 5: // Get draft workflow stage 6: DocumentIdIterator draftIt = workspace.findByName(DocumentTypes.WorkflowStage,"Draft"); 7: DocumentId draftSt = null; 8: if (draftIt.hasNext()){ 9: draftSt = (DocumentId) draftIt.next(); 10: } 11: 12: if (draftIt!=null) { 13: 14: // Get all the content in this stage 15: DocumentId[] arraySt=new DocumentId[1]; 16: arraySt[0]=draftSt; 17: String[] arrayUsers=new String[1]; 18: arrayUsers[0]=request.getUserPrincipal().getName(); 19: DocumentIdIterator drafts = workspace.findContentByWorkflowStage(arraySt,arrayUsers,Workspace.ROL E_AUTHOR); 20: boolean found=false; 21: while (drafts.hasNext()) { 22: found=true; 23: DocumentId draft = (DocumentId) drafts.next(); 24: out.println("<tr>"); 25: out.println("<td>" + draft.getName() + 26: "</td><td><a href='?wcmAuthoringAction=read&docid=com.ibm.workplace.wcm.api.WCM_Co ntent/&quot; + draft.getId() + "'>Open</a></td>"); 27: out.println("<td><a href='?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Co ntent/&quot; + draft.getId() + "'>Edit</a></td>"); 28: out.println("<td><a href='?wcmAuthoringAction=approve&docid=com.ibm.workplace.wcm.api.WCM _Content/" + draft.getId() + "'>Approve</a></td>"); 29: out.println("</tr>"); 30: } 31: if (!found) { 32: out.println("There are no drafts currently available"); 33: } 34: } 35: %> 36: </table> 37: </div>

299 of 439

Section 4: Content pending for approval


The content pending for approval section is built in the same way as Section 3. An additional workflow stage (approval) is added to the search query, and the content is filtered by using ROLE_APPROVER. 1: <h4><a href="javascript:display('approval')">View Content Requiring My Approval</a></h4> 2: <div id="approval" style="display:block"> 3: 4: <table> 5: <% 6: 7: // Get approval workflow stage DocumentIdIterator 8: approvalIt = workspace.findByName(DocumentTypes.WorkflowStage,"Approval"); 9: DocumentId approvalSt=null; 10: 11: if (approvalIt.hasNext()){ 12: approvalSt = (DocumentId) approvalIt.next(); 13: } 14: 15: if (draftSt!=null && approvalSt!=null){ 16: 17: // Get all the content in this stage 18: DocumentId[] arraySt=new DocumentId[2]; 19: arraySt[0]=draftSt; 20: arraySt[1]=approvalSt; 21: String[] arrayUsers=new String[1]; 22: arrayUsers[0]=request.getUserPrincipal().getName(); 23: DocumentIdIterator approvedDocs = workspace.findContentByWorkflowStage(arraySt,arrayUsers,Workspace.ROL E_APPROVER) ; 24: boolean found=false; 25: while (approvedDocs.hasNext()) { 26: found=true; 27: DocumentId approved = (DocumentId) approvedDocs.next(); 28: out.println("<tr>"); 29: out.println("<td>" + approved.getName() + "</td>"); 30: out.println("<td><a href='?wcmAuthoringAction=read&docid=com.ibm.workplace.wcm.api.WCM_Co ntent/& quot; + approved.getId() + "'>Open</a></td>"); 31: out.println("<td><a href='?wcmAuthoringAction=approve&docid=com.ibm.workplace.wcm.api.WCM _Conten t/" + approved.getId() + "'>Approve</a></td>"); 32: out.println("<td><a href='?wcmAuthoringAction=decline&docid=com.ibm.workplace.wcm.api.WCM _Conten t/" + approved.getId() + "'>Decline</a></td>");

300 of 439

33: out.println("</tr>"); 34: } 35: if (!found) { 36: out.println("There are no documents pending for approval"); 37: } 38: } else { 39: out.println("Draft or Approval stages couldn't be found"); 40: } %> 41: </table> </div>

Section 5: My Published content


The my published content section is built by using the same steps as in the two previous examples.
1: <h4><a href="javascript:display('published')">My Published Content</a></h4> 2: <div id="published" style="display:block"> 3: 4: <table> 5: <% 6: // Get published workflow stage 7: DocumentIdIterator publishedIt = 8: workspace.findByName(DocumentTypes.WorkflowStage,"Published"); 9: if (publishedIt.hasNext()){ 10: DocumentId publishedSt = (DocumentId) publishedIt.next(); 11: // Get all the content in this stage 12: DocumentId[] arraySt=new DocumentId[1]; 13: arraySt[0]=publishedSt; 14: String[] arrayUsers=new String[1]; 15: arrayUsers[0]=request.getUserPrincipal().getName(); 16: DocumentIdIterator publishedDocs = workspace.findContentByWorkflowStage(arraySt,arrayUsers,Workspace.ROLE_AUTHOR ); 17: boolean found=false; 18: while (publishedDocs.hasNext()) { 19: found=true; 20: DocumentId published = (DocumentId) publishedDocs.next(); 21: out.println("<tr><td>" + published.getName() + "</td><td><a href='?wcmAuthoringAction=read&docid=com.ibm.workplace.wcm.api.WCM_Content/&q uot; + published.getId() + "'>Open</a></td></tr>"); 22: } 23: if (!found) { 24: out.println("There are no published documents"); 25: } 26: } 27: %> 28: </table> 29: </div>

301 of 439

Section 6: Open main view


The open main view section provides access to the default authoring user portlet interface. 1: <h4><a href="?wcmAuthoringAction=openmainview">Open main view</a></h4>

4.1.3. Custom content elements


A "custom JSP" field is available on some element types when added to an authoring template. You can use this field to reference a JSP file to use instead of the element's default view in the user interface. You can write JSP to control the look and feel of an element and to restrict the values that can be entered into an element. You can also write JSP to create sophisticated UI components such as auto-completion boxes and pop-ups. You can find a complete set of examples in the "Customizing elements using JSP" topic in the WebSphere Portal information center at the following address:
Link to customizing authoring elements documentation

The JSP page must be stored in the WAR file directory for the Authoring portlet, which is was_profile_root/installedApps/ cellname /PA_WCM_Authoring_UI.ear/ilwwcmauthoring.war/jsp/html. In this directory name, cellname is unique to your installation. The JSP page might also need to be stored in the client WAR directory of the servlet or portlet that calls the JSP, such as when using the authoring tool element, or if using the IBM Web Content Manager API. For example, if displaying custom fields in content that is opened by using the edit button on an authoring tool, you also need to save the custom field JSP in the WAR file directory for the local rendering portlet.

4.1.4. Rich-text editors


IBM Web Content Manager supports replacement of the out-of-the-box rich text editor with many third-party editors. At a minimum, for an editor to work within the web content authoring portlet, it must support the setting and getting of its current HTML value via JavaScript. Refer to the "Examples of replacing the out of the box rich text editor in Web Content Manager" wiki article at the following address for specific examples:
Link to replacing the out of the box rich text editor instructions

4.1.5. WebDAV
Web-based Distributed Authoring and Versioning (WebDAV) is a set of methods based on the Hypertext Transfer Protocol (HTTP) that facilitates collaboration between users in editing and managing documents and files stored on world wide web servers. WebDAV enables you to work with your web content items by leveraging tools like file explorers to create image or file components by dragging a file into a corresponding folder, perform actions on several items at once, editing templates and modifying any item's metadata or access control settings by modifying XML files.

302 of 439

4.2. Integrating with other systems


This section describes the integration options of IBM Web Content Manager (WCM) with third party applications including Enterprise Content Management (ECM) systems and web analytics solutions.

4.2.1. ECM integration


Organizations around the world use different types of ECM solutions such as IBM FileNet and rely on WebSphere Portal to aggregate content and applications from different sources. In this section we outline an overview of how third party ECM systems can be integrated with WCM.

Standard portlets
It is common for third party ECM software to provide standard JSR168 or JSR286 portlets that can be used within the WebSphere Portal environment. This pattern should be considered an entry point to ECM integration because it lacks many features such as search, authorization or personalization integration that can be achieved using richer integration capabilities that we will describe later in this article.

IBM FileNet and IBM Content Manager integration


WCM provides a functionality called "federated documents support" that empowers authors to reuse assets located in ECM systems by linking them from rich text or HTML items or by displaying them in a live feed rendered through a personalization component.

Federated documents are documents that are referenced in WCM but really "live" in another system such as FileNet, Content Manager or Quickr.

303 of 439

To simplify the creation of federated documents rules and links, WCM provides an user friendly dialog box called "Document Picker". The Document Picker makes it easy for content authors to browse an external repository and select the document that they want to link.

For authentication, Document Picker can reuse the SSO mechanisms configured between WCM and the ECM system or allow the authors to enter a different user and password to access the repository. Access to ECM systems is achieved through the Portal AJAX proxy, so it's important to create the right policies to ensure connectivity between them Link to instructions Access to ECM systems may require the deployment of additional software capabilities in the source system such as the Quickr REST services for FileNet.

4.2.2. Web Content Integrator


Web Content Integrator (WCI) is a Portal module that allows rich integration with third party ECMs or other information sources, making use of the key WebSphere Portal capabilities such as search, security and personalized content delivery. WCI allows content created in third party ECM systems to be published in WCM by using RSS/ATOM feeds that store the META data and data in WCM and adhere to the IBM WCI specification.

304 of 439

IBM WCI can be easily understood by describing the various entities involved: Feed Producer: This is a custom application built at the third party ECM level that uses the IBM WCI specification to produce the RSS/ATOM feed. RSS/ATOM Feed: This is the RSS/ATOM Feed that is generated by the third party ECM custom application which contains the META data and data required by WCM. WCI: IBM WCI is a Portal component that consumes the RSS/ATOM feed and uses the META data information from the feed to create new, update existing or delete WCM content.

Working with IBM Web Content Integrator

4.2.3. Java Messaging System (JMS) for Web Content


Web Content Manager provides support for the notification of authoring and system events such as item state changes, or syndication services starting and stopping. These notifications can be delivered as messages to a Java messaging service infrastructure for integration purposes. There are three classes of events that can be delivered as messages to the Java messaging service: Item events: Item created, updated, moved or deleted Syndication events: starting / stopping Pre-render events: starting / stopping

Sample scenarios where JMS for Web Content can be used are the expiration of custom caching mechanisms, integration of business logic on item change, implementation of audit systems, etc.

Sample of JMS for web content


The RiverBend administrators want to keep track of which items are changed in WCM by logging changed items in the application server console. To do this, the development team has created a message-driven EJB that logs these events and deployed it as an EAR application in WebSphere Application Server: Link to application package

305 of 439

Before you start you need to deploy JMS resources in WCM: Link to instructions on creating JMS resources for WCM

To understand this sample it is important that you are familiar with JMS and message driven beans concepts: Link to JMS and MDB basic concepts Then you have to create an EJB project in Rational Application Developer and include on it a message driven bean with this code:

1: 2: package com.ibm.redwiki; 3: 4: import javax.ejb.ActivationConfigProperty; 5: import javax.ejb.MessageDriven; 6: import javax.jms.Message; 7: import javax.jms.MessageListener; 8: 9: /** 10: * Message-Driven Bean implementation class for: WCMItemEJB 11: * 12: */ 13: @MessageDriven( 14: activationConfig = { @ActivationConfigProperty( 15: propertyName = "destinationType", propertyValue = "javax.jms.Topic" 16: 17: ),@ActivationConfigProperty(propertyName="destination", propertyValue="jms/IWKTopics/Items")}, 18: mappedName = "IWKTopics_Items") 19: public class WCMItemEJB implements MessageListener { 20: 21: /** 22: * Default constructor. 23: */ 24: public WCMItemEJB() { 25: } 26: 27: /** 28: * @see MessageListener#onMessage(Message) 29: */ 30: public void onMessage(Message message) { 31: System.out.println(message.toString()); 32: 33: } 34: }

306 of 439

The source code for the message driven bean is very simple to understand; it registers with the WCM JMS Topic queue to be notified every time a content item is changed. When a change event is received, it is logged in the application server console. In order to make this sample work, you need to bind the message driven bean to the JMS activation for WCM topics that is configured in WAS. This is done by creating an XML file under META-INF/ibm-ejb-jar-bnd.xml with this content: 1: 2: <?xml version="1.0" encoding="UTF-8"?> 3: <ejb-jar-bnd 4: xmlns="http://websphere.ibm.com/xml/ns/javaee" 5: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 6: xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd" 7: version="1.0"> 8: 9: <message-driven name="WCMItemEJB"> 10: <jca-adapter activation-spec-bindingname="jms/IWKItemChangeMonitorActivation" destination-bindingname="jms/IWKTopics/Items"/> 11: </message-driven> 12: </ejb-jar-bnd>

Reference
You can find more information on message driven beans coding and configuration details in this article: Link to message driven beans article

4.2.4. Web analytics


Site analytics enable WebSphere Portal and WCM customers to easily capture and measure user activity, so portals can be better designed and targeted. WebSphere Portal and WCM has supported server side analytics for some time. Server side analytics traces the usage of pages and portlets to a dedicated log file. Multiple types of site analyzer loggers allow portal administrators to gather statistical data in varying areas. Active site analytic support is a newer approach to the same requirements, but it runs on the client-side, collecting and sending information in real time to web analytics solutions such as Coremetrics, Omniture, and Webtrends. The underlying framework can be extended to support other Web analytic providers.
Aggregators For Active Site Analytics in WebSphere Portal 7

Site analytic support in WebSphere Portal is based on the injection of generic microformats (standard HTML tags with specific attributes) into portal pages or web content, eliminating the need for changing themes or skins when adding vendor specific JavaScript for analytics reporting.

307 of 439

This microformats are parsed on run-time by the Portal engine and sent to the analytics provider by an aggregator. An aggregator is a JavaScript function that composes an HTML entity such an image or an AJAX call to send the information that has been logged to the analytics provider. WebSphere Portal ships two sample aggregators that you can review to get started before creating your own:

1: 2: // This is a sample for an Active Site Analytics aggregator. 3: // It injects a 1x1 pixel image into every page that has the metadata item "asa.aggregator" set to "asa_sample.js" 4: // This image contains a list of portlet ids and titles, as well as the page title and canonical URL, as HTTP GET 5: // parameters. 6: 7: // retrieve portlet titles tagged with <span class="asa.portlet.title"/> 8: var portletTitles = new Array(); 9: 10: getElementHTMLByClassName("span", "asa.portlet.title", portletTitles); 11: 12: 13: // retrieve portlet IDs tagged with <span class="asa.portlet.id"/> 14: var portletIDs = new Array();

308 of 439

15: 16: getElementHTMLByClassName("span", "asa.portlet.id", portletIDs); 17: 18: 19: // retrieve the page's link node containing the bookmark 20: var bookmarkElement = null; 21: var links = document.getElementsByTagName("link"); 22: for (var index = 0; index < links.length; index++) { 23: var elem = links[index]; 24: if (elem.getAttribute("rel") == "bookmark") { 25: bookmarkElement = elem; 26: break; 27: } 28: } 29: 30: var imgURL = "http://example.com/analytics/tracking.png" 31: + "?" + "page_title=" + escape(bookmarkElement.getAttribute("title")) 32: + "&" + "page_url=" + escape(bookmarkElement.getAttribute("href")) 33: + "&" + "portlets=" + escape(portletTitles.join(',')) 34: + "&" + "portlet_ids=" + escape(portletIDs.join(',')) 35: //alert("imgURL = " + imgURL); 36: 37: document.write("<img alt='' src='" + imgURL + "' width='1' height='1'>"); 38: 39: 40: function getElementHTMLByClassName(strTagName, strClassName, arrReturnElements){ 41: var arrElements = document.getElementsByTagName(strTagName); 42: strClassName = strClassName.replace(/\-/g, "\\-"); 43: var regex = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); 44: var elem; 45: for(var i = 0; i < arrElements.length; i++){ 46: elem = arrElements[i]; 47: if(regex.test(elem.className)){ 48: arrReturnElements.push(elem.innerHTML); 49: } 50: } 51: return (arrReturnElements) 52: }

4.2.5. Reference
Enabling Active Site Analytics in WebSphere Portal 7.0 Site analytics and optimization

309 of 439

4.3. Programming
The IBM Web Content Manager API is focused on processing the content programmatically. This section provides an overview of the WCM API, links to the API documentation and Javadoc, and an introduction to the new API features in WCM 7.0.

WCM API
The WCM API is an alternative way to access a site that allows web developers to create, edit, delete, and render WCM objects by using Java code. Additionally, clients can manipulate their site and integrate WCM with other applications in many ways. The API offers only a subset of IBM Web Content Manager's functionality, although it is a very useful subset. Typical API scenarios may include the following examples: Create a taxonomy from a comma delimited file Bulk resource import Content search Perform search and retrieval operations, such as finding a given object by name, or finding content based on a workflow stage Integrate WCM with third-party applications.

The following figure illustrates the way in which the WCM repository is accessed.

Following are a list of sample functions available when using the IBM Web Content Manager API. You can find the complete list in this link: API Overview Find items of given type. Find library components by name Find content by authoring template, category, path, workflow stage, modified between dates.

310 of 439

The ability to create, delete and save the following items: Content, Site Areas, most types of components, Taxonomies and Categories, Projects, Folders. The ability to retrieve the following items: Content, Site areas, Taxonomies and categories, Workflows, Components, Projects, Folders.

The ability to approve or reject content items in a workflow stage. Other item-types do not support this function. WCM API Javadoc is available online or to download in this wiki: Lotus Web Content
Manager API

New features in the WCM 7.0 API


New features in the WCM 7.0 API covered here are: Projects and folders creation and modification Query API Rendering plugin extension point Text provider extension point

Creating and modifying projects and folders


Projects are a new feature in WCM that group the changes that a set of users are making together, treating them as one unit for preview, publishing and syndication. Working with
projects

The WCM API supports the most basic functions of projects such as getting the items that are contained in a project, managing its members or publishing a project. In WCM 7, folders can be used to organize components. This is useful when you have large numbers of items in your library and want to distinguish between different groups of items within each item type view. Working with folders The WCM API also supports navigating folder structures and setting name and titles.

311 of 439

Query API
Query API is a completely new set of classes designed to provide an optimized method to query for content in the WCM repository. The results of a Query API search can be sorted by Author, Date created, Item name, Date modified, Item title and paged. The following terms (selectors) can be combined to compose queries using the API: Item type, ID, name, title Library, Project state Creator, Authors, Owners, Last modifier Modified before / since, Created before / since Categories, Keywords Workflow, Workflow stage, Workflow status, Publish date, Expire date

Query API sample


The Query API is based on the use of selectors that restrict the type of elements that you want to retrieve from the repository. A Query API block of code typically will follow the structure presented in this example: 1: 2: // Get the query service 3: QueryService queryService = wcmWorkspace.getQueryService(); 4: 5: // Create a query 6: Query query = queryService.createQuery(); 7: 8: // Query for content only 9: query.addSelector(Selectors.typeIn(Content.class)); 10: 11: // Limit the query to a specific library 12: DocumentLibrary selectionLibrary = wcmWorkspace.getDocumentLibrary("PEC"); 13: query.addSelector(Selectors.libraryEquals(selectionLibrary)); 14: 15: // Add selector to limit to the items modified in the last week 16: query.addSelector(HistorySelectors.modifiedSince(oneWeekAgo())); 17: 18: // Sort by last modified date 19: query.addSort(Sorts.byDateModified(SortDirection.DESCENDING)); 20: 21: // Execute the query 22: ResultIterator resultIterator = queryService.execute(query);

312 of 439

Rendering plugin extension point


Rendering plugins are custom presentation components that contribute dynamic content to a presentation template. In many ways, they work like JSPs components but with a more friendly syntax and additional capabilities. Examples of rendering plugins include the insertion of tagging and rating widgets, and video players. You can reference rendering plugins from HTML or Rich text fields using the plugin tag: [Plugin:{Plugin Name}] For example: 1: [Plugin:video width="320" height="240" video="QB9vhHMd6jw"]

Rendering plugin samples


There are a number of rendering plugin samples in this wiki that you can use to deep dive into this new feature:
Creating a rendering plug-in class: wcm7 Creating and Using a Rendering Plugin to Embed Video

Text provider extension point


Text providers are a new feature of WCM 7 that allow localization of fields in the views and forms of the authoring UI to provide multilingual support of the authoring environrment. The elements that can be localized include: Display titles Descriptions Labels for elements on Authoring Templates Help fields

WCM includes one default text provider but has an extension point to allow site designers to define new sources of translations for a given key such as database tables or XML files. Creating a Text Provider class

4.3.1. Rendering plugin example


A sample rendering plugin will show the overall process of creating, deploying, and leveraging a custom rendering plugin within WCM. DISCLAIMER OF WARRANTIES: The accompanying code provided in this section (and throughout this wiki) is sample code, created by the authors of this wiki. This sample code is not part of any standard or IBM product and is provided to you solely for the purpose of assisting you in the development of your website. The code is provided as is,

313 of 439

without warranty of any kind. IBM shall not be liable for any damages arising out of your use of the sample code, even if they have been advised of the possibility of such damages.

Rendering plugins
See the infocenter

for information on WCM rendering plugins.

4.3.2. Creating the Rendering plugin code


To create the custom rendering plugin, Rational Application Developer was used. For this example we're going to have the custom rendering plugin code, as well as some custom jsp's to use during authoring of WCM content to set up the assets we need to use the custom rendering plugin tag. Additionally, we'll use a custom servlet class to be used for the custom jsp's.

A Quick Discussion of the Tag Format


For this custom rendering plugin, the tag format that is placed within WCM is as follows: [Plugin:WCMFiles update="true" htmlcomponent="[Element context='current' type='content' key='HTMLFilesFormat']" folderid="[Element context='current' type='content' key='WCMFiles']"]

For now, do not worry about the tag details. Just know that we will be using htmlcomponent and folderid values within the custom rendering code, which is why we mention the tag format here. Since we're about to detail the custom rendering code it's important to know what the tag will be passing in.

Create the dynamic web project


To create the code, we need to create the dynamic web project. Click on New -> other -> Dynamic Web Project. Name the project RiverbendFilesPlugin. You will have to add the project to an ear, so you should create the new EAR project within the same dialog. Name the EAR project RiverbendFilesPluginEAR.

314 of 439

315 of 439

Once the Web Project has been created, you have to add either the Portal 7 runtime, or the ilwwcm-api.jar to the classpath properties of the project. Right click project in the explorer, and select Java build path. Ensure that a Portal server 7 runtime has been added, or a reference to the ilwwcm-api.jar file from your server:

The reason we need this is that we will need some of the WCM API classes in order to create the custom classes.

Create the custom classes


Before creating the classes, we should create the package for these classes. In the project, right click the Java Resources -> src folder, then select New -> Package.

316 of 439

Name the package com.riverbend.renderingplugin. Once the package has been created the custom classes can be created. Next, right click on the new package, and select New -> Class. Name the class WCMFilesPlugin, and click Finish.

317 of 439

Once the class has been created, paste the following code in:

1: 2: /** 3: * DISCLAIMER OF WARRANTIES: The accompanying code provided in this section 4: * (and this wiki) is sample code, created by the authors of this wiki. 5: * This sample code is not part of any standard or IBM product and is 6: * provided to you solely for the purpose of assisting you in the development of 7: * your website. The code is provided as is, without warranty of any kind. 8: * IBM shall not be liable for any damages arising out of your use of the 9: * sample code, even if they have been advised of the possibility of such damages. 10: */ 11: package com.riverbend.renderingplugin; 12: 13: import java.io.IOException; 14: import java.io.Writer; 15: import java.util.List; 16: import java.util.Locale; 17: import java.util.Map; 18: 19: import com.ibm.workplace.wcm.api.Document; 20: import com.ibm.workplace.wcm.api.DocumentId; 21: import com.ibm.workplace.wcm.api.Folder; 22: import com.ibm.workplace.wcm.api.LibraryComponent; 23: import com.ibm.workplace.wcm.api.LibraryFileComponent; 24: import com.ibm.workplace.wcm.api.LibraryHTMLComponent; 25: import com.ibm.workplace.wcm.api.RenderingContext; 26: import com.ibm.workplace.wcm.api.WCM_API; 27: import com.ibm.workplace.wcm.api.Workspace; 28: import com.ibm.workplace.wcm.api.exceptions.AuthorizationException; 29: import com.ibm.workplace.wcm.api.exceptions.DocumentIdCreationException; 30: import com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException; 31: import com.ibm.workplace.wcm.api.exceptions.OperationFailedException; 32: import com.ibm.workplace.wcm.api.exceptions.QueryServiceException; 33: import com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException; 34: import com.ibm.workplace.wcm.api.plugin.rendering.RenderingPlugin; 35: import com.ibm.workplace.wcm.api.plugin.rendering.RenderingPluginException;

318 of 439

36: import com.ibm.workplace.wcm.api.plugin.rendering.RenderingPluginModel; 37: import com.ibm.workplace.wcm.api.query.Query; 38: import com.ibm.workplace.wcm.api.query.QueryService; 39: import com.ibm.workplace.wcm.api.query.ResultIterator; 40: import com.ibm.workplace.wcm.api.query.Selectors; 41: 42: /** 43: * A rendering plugin that will display the fileresources containing in a folder 44: * and render out based on a html template 45: */ 46: public class WCMFilesPlugin implements RenderingPlugin { 47: /** 48: * 49: */ 50: private static final long serialVersionUID = 1742627406969994207L; 51: /** The name used for identifying this object */ 52: private static final String PLUGIN_NAME = "WCMFiles"; 53: 54: @Override 55: public boolean isShownInAuthoringUI() { 56: return true; 57: } 58: 59: @Override 60: public String getName() { 61: return PLUGIN_NAME; 62: } 63: 64: @Override 65: public boolean render(RenderingPluginModel p_model) 66: throws RenderingPluginException { 67: boolean success = true; 68: Writer renderWriter = p_model.getWriter(); 69: Map<String, List<String>> pluginParams = p_model.getPluginParameters(); 70: 71: RenderingContext rc = p_model.getRenderingContext(); 72: System.out.println("*** New got rendering context ***"); 73: 74: // Get the defined folder id 75: String folderid = pluginParams.get("folderid").get(0); 76: 77: // Get the id of the html to render the item 78: String htmlcomponent = pluginParams.get("htmlcomponent").get(0); 79: 80: // The output 81: String output = "";

319 of 439

82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: {

// The pattern to replace filename String FILENAMESTR = "FILENAME"; // The pattern to replace url String FILEURLSTR = "FILEURL"; // The html to format results String html = ""; Workspace workspace; if (folderid != null && htmlcomponent != null)

94: try { 95: workspace = WCM_API.getRepository().getWorkspace(); 96: workspace.useUserAccess(true); 97: 98: DocumentId docid = workspace.createDocumentId(folderid); 99: Folder folder = (Folder) workspace.getById(docid); 100: 101: // Get the first matching folder name 102: if (htmlcomponent != null) { 103: 104: html = htmlcomponent; 105: 106: // Get the children of the folder 107: try { 108: ResultIterator children = folder.getChildren(); 109: String filename = ""; 110: String fileurl = ""; 111: 112: while (children.hasNext()) { 113: // Check to see if its a file resource and then 114: // render the results using the html component 115: Document doc = (Document) children.next(); 116: String htmlout = html; 117: 118: //

320 of 439

System.out.println("*** working on output ***"); 119: LibraryComponent lc = (LibraryComponent) doc; 120: if (lc instanceof LibraryFileComponent) { 121: filename = lc.getTitle(); 122: fileurl = workspace.render(rc, lc); 123: htmlout = htmlout 124: 125: htmlout = htmlout.replace(FILEURLSTR, fileurl); 126: output = output + htmlout; 127: } 128: 129: } 130: 131: } catch (QueryServiceException e) { 132: // TODO Autogenerated catch block 133: output = "QueryServiceException"; 134: } 135: 136: } 137: 138: } catch (ServiceNotAvailableException e) { 139: // TODO Auto-generated catch block 140: output = "ServiceNotAvailableException"; 141: } catch (OperationFailedException e) { 142: // TODO Auto-generated catch block 143: output = "OperationFailedException"; 144: } catch (DocumentIdCreationException e) { 145: // TODO Auto-generated catch block 146: e.printStackTrace(); 147: } catch (DocumentRetrievalException e) { 148: // TODO Auto-generated catch block 149: e.printStackTrace(); 150: } catch (AuthorizationException e) { 151: // TODO Auto-generated catch

321 of 439

block 152: e.printStackTrace(); 153: } 154: 155: try { 156: // Render the output 157: renderWriter.append(output); 158: 159: } catch (IOException ioe) { 160: ioe.printStackTrace(); 161: success = false; 162: } 163: } 164: 165: return success; 166: } 167: 168: @Override 169: public String getDescription(Locale p_locale) { 170: return "Renders the contents of a defined folder in WCM"; 171: } 172: 173: @Override 174: public String getTitle(Locale p_locale) { 175: return PLUGIN_NAME; 176: } 177: 178: }

The important part of the code is in the render method. This is what will be invoked when you render the tag for the plugin. In this specific example, what the plugin is doing is finding the folder within WCM for the parameter passed on the tag for folderid, and the html to be used to render the file information. We will pass the html to use directly from the content. Note that in this example tag: 1: 2: [Plugin:WCMFiles update="true" htmlcomponent="[Element context='current' type='content' key='HTMLFilesFormat']" folderid="[Element context='current' type='content' key='WCMFiles']"] We're retrieving the folder and the htmlcomponent directly from content. We will detail how those values are populated later in the article. For now know that the values are retrieved from content and passed in on the tag. What the code is basically doing is retrieving all files within the folder that's been passed, and rendering information about them to the page. The htmlcomponent value is used to determine what is rendered for each match. In this case, we will use the following in the html component: 1: 2:

<a target="" title="" href="FILEURL" >FILENAME</a><br/>

322 of 439

and the code in the custom rendering plugin will replace FILEURL and FILENAME with the relevant values from each file.

Create the plugin.xml


In order for WCM to pick up the custom rendering plugin class, the application must contain a plugin.xml in /WEB-INF/ directory. Right click on the WebContent/WEB-INF directory within the RiverbendFilesPlugin, and select new file:

Name the file plugin.xml. Enter the following into the new file: 1: 2: <?xml version="1.0" encoding="UTF-8"?> 3: <plugin 4: id="wcmfiles.plugin" 5: name="WCM Files Plugin" 6: version="1.0.1" 7: provider-name="Riverbend"> 8: <extension point="com.ibm.workplace.wcm.api.RenderingPlugin" id="WCMFilesPlugin"> 9: <provider class="com.riverbend.renderingplugin.WCMFilesPlugin"/> 10: </extension> 11: </plugin> Basically what this does is register the WCMFilesPlugin as a custom rendering plugin within the system. Once the application is installed and deployed, when rendering WCM content and using the rendering plugin tag, WCM will be able to retrieve the relevant information.

Creating the Custom Servlet Class


For the custom jsp files that will be used to populate content with the relevant information, we need to create a servlet. Right click the RiverbendFilesPlugin project and select New > Other, then select Servlet from the list of possible items. The wizard will pop up, use the following values for your servlet: Project: RiverbendFilesPlugin Source folder: \RiverbendFilesPlugin\src

323 of 439

Java package: com.riverbend.renderingplugin.servlet Class name: JSONResponse Superclass: javax.servlet.http.HttpServlet

324 of 439

Click Next. Note that the URL Mappings: already has a line for /JSONResponse:

Click Finish.

In the servlet class, enter the following code: 1: 2: /** 3: * DISCLAIMER OF WARRANTIES: The accompanying code provided in this section 4: * (and this wiki) is sample code, created by the authors of this wiki. 5: * This sample code is not part of any standard or IBM product and is 6: * provided to you solely for the purpose of assisting you in the development of 7: * your website. The code is provided as is, without warranty of any kind. 8: * IBM shall not be liable for any damages arising out of your use of the 9: * sample code, even if they have been advised of the possibility of such damages.

325 of 439

10: */ 11: package com.riverbend.renderingplugin.servlet; 12: 13: import java.io.IOException; 14: import java.security.Principal; 15: 16: import javax.servlet.ServletException; 17: import javax.servlet.http.HttpServlet; 18: import javax.servlet.http.HttpServletRequest; 19: import javax.servlet.http.HttpServletResponse; 20: 21: import com.ibm.workplace.wcm.api.*; 22: import com.ibm.workplace.wcm.api.exceptions.AuthorizationException; 23: import com.ibm.workplace.wcm.api.exceptions.DocumentIdCreationException; 24: import com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException; 25: import com.ibm.workplace.wcm.api.exceptions.OperationFailedException; 26: import com.ibm.workplace.wcm.api.exceptions.QueryServiceException; 27: import com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException; 28: import com.ibm.workplace.wcm.api.exceptions.WCMException; 29: import com.ibm.workplace.wcm.api.query.QueryService; 30: import com.ibm.workplace.wcm.api.query.ResultIterator; 31: import com.ibm.workplace.wcm.api.query.Query; 32: import com.ibm.workplace.wcm.api.query.Selectors; 33: 34: /** 35: * Servlet implementation class JSONResponse 36: */ 37: public class JSONResponse extends HttpServlet { 38: private static final long serialVersionUID = 1L; 39: 40: /** 41: * @see HttpServlet#HttpServlet() 42: */ 43: public JSONResponse() { 44: super(); 45: // TODO Auto-generated constructor stub 46: } 47: 48: /** 49: * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 50: * response) 51: */ 52: protected void doGet(HttpServletRequest request, 53: HttpServletResponse response) throws

326 of 439

ServletException, IOException { 54: // TODO Auto-generated method stub 55: } 56: 57: /** 58: * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 59: * response) 60: */ 61: protected void doPost(HttpServletRequest request, 62: HttpServletResponse response) throws ServletException, IOException { 63: // TODO Auto-generated method stub 64: Principal userPrincipal = request.getUserPrincipal(); 65: 66: String rd = ""; 67: Workspace usersWorkspace = null; 68: if (userPrincipal != null) { 69: // very important is to place user specific workspace key in session 70: usersWorkspace = (Workspace) request.getSession() 71: .getAttribute( 72: userPrincipal.getName() + "_" 73: 74: if (usersWorkspace == null) { 75: try { 76: usersWorkspace = WCM_API.getRepository().getWorkspace( 77: userPrincipal); 78: if (usersWorkspace != null) { 79: request.getSession().setAttribute( 80: userPrincipal.getName() + "_" 81: 82: usersWorkspace); 83: } 84: } catch (OperationFailedException e) { 85: // logger.log(Level.WARNING, e.getMessage(), e); 86: } catch (ServiceNotAvailableException e) { 87: // logger.log(Level.WARNING, e.getMessage(), e);

327 of 439

88: } 89: } else { 90: 91: } 92: } 93: else 94: { 95: // get a system workspace 96: try 97: { 98: usersWorkspace = WCM_API.getRepository().getSystemWorkspace(); 99: } 100: catch(Exception e) 101: { 102: e.printStackTrace(); 103: } 104: } 105: 106: usersWorkspace.logout(); 107: usersWorkspace.login(); 108: 109: // Set-up the query service 110: QueryService queryService = usersWorkspace.getQueryService(); 111: Query query = queryService.createQuery(Folder.class); 112: query.returnObjects(); 113: ResultIterator results = null; 114: String libName = request.getParameter("libName"); 115: 116: DocumentLibrary docLib = usersWorkspace.getDocumentLibrary(libName); 117: // Set the library to the current library. This may cause issues if the 118: // library hasn't been selected. Should add a lib selector in 119: query.addSelector(Selectors.libraryEquals(docLib)); 120: 121: // Get the components folder 122: query.addSelector(Selectors.nameEquals("Components")); 123: 124: // Get all of the children of the component folder and build the json

328 of 439

125: // for the store 126: String parent = ""; 127: 128: try { 129: results = queryService.execute(query); 130: while (results.hasNext()) { 131: // This is the parent folder 132: Folder parentfolder = (Folder) results.next(); 133: // Go get the children 134: rd = getFolderChildren(parentfolder, "", 0); 135: 136: // ok we have a response 137: if (rd.length() != 0) { 138: 139: int returnCode = HttpServletResponse.SC_OK; 140: response.setStatus(returnCode); 141: response.getWriter().write("[" + rd); 142: response.getWriter().flush(); 143: } 144: 145: } 146: } catch (QueryServiceException e1) { 147: // TODO Auto-generated catch block 148: e1.printStackTrace(); 149: } catch (WCMException e) { 150: // TODO Auto-generated catch block 151: e.printStackTrace(); 152: } 153: 154: } 155: 156: private String getFolderChildren(Folder folder, String result, int id) 157: throws WCMException { 158: 159: // Get all of the children 160: ResultIterator children = folder.getChildFolders(); 161: int count = children.getSize(); 162: 163: // If there are no children then return otherwise set these as children

329 of 439

164: // in the json 165: int current = 0; 166: if (count == 0) { 167: return result; 168: } else { 169: if (id != 0) { 170: result = result + ", \"children\":["; 171: } 172: } 173: 174: // Cycle through the children building up the json 175: while (children.hasNext()) { 176: Folder child = (Folder) children.next(); 177: 178: // up the counter 179: current++; 180: // Get the doc id 181: String docId = child.getIdentity().getID().toString(); 182: 183: // Set the label (folder name) and docid 184: result = result + "{ \"label\":\"" + child.getName() 185: + "\", \"id\": \"" + docId + "\""; 186: 187: // go get this folders children 188: result = getFolderChildren(child, result, id++); 189: 190: // If we are on the last one then close off this section else close 191: // this item 192: if (count == current) { 193: result = result + "}]"; 194: } else { 195: result = result + "},"; 196: } 197: 198: } 199: return result; 200: } 201: 202: } At a high level, all this code is doing is grabbing a list of folders in the Components folder of the library that's passed in. So this way, we will have a json object that contains the component folders. This is used to populate the content later with the selected folder you wish to use to render for the custom rendering plugin.

330 of 439

Creating the Custom jsp file


Now we need jsp file to be used during authoring to populate the folder you want to use to retrieve the files from. First we have to create the folders to hold the jsp file. Right click the WebContent directory of the RiverbendFilesPlugin, and select new -> folder. Enter "jsp/html" in the popup:

Then hit Finish. Now, right click the WebContent/jsp/html folder, and select new -> other. Select JSP File, you may have to click on show all wizards:

331 of 439

Click Finish. In the JSP, enter the following code:

1: 2: <%@ page import="java.util.*, 3: com.ibm.workplace.wcm.api.*, 4: com.ibm.workplace.wcm.api.exceptions.*, 5: com.ibm.workplace.wcm.api.authoring.CustomItemBean, 6: com.ibm.workplace.wcm.api.query.Query, 7: com.ibm.workplace.wcm.api.query.QueryService, 8: com.ibm.workplace.wcm.api.query.ResultIterator, 9: com.ibm.workplace.wcm.api.query.Selectors, 10: javax.naming.InitialContext, 11: javax.naming.NamingException, 12: com.ibm.websphere.cache.DistributedMap, 13: java.util.Iterator" 14: session="true"%> 15: <%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %> 16: <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %> 17: 18: <portletAPI:init /> 19: <wcm:initworkspace user="<%= request.getUserPrincipal() %>" /> 20: 21: <% 22: 23: /* 24: rob.enright@uk.ibm.com July 11 25: Builds a list of the libraries in this instance 26: Makes a call to the servlet to return the folders for the selected library 27: Updates the UI with a dijit tree of the folders 28: Stores the folder id for use with the WCMFiles rendering plug-in 29: 30: */ 31: CustomItemBean customItem = (CustomItemBean) request.getAttribute("CustomItemBean"); 32: customItem.setSubmitFunctionName("myoptionsubmit"); 33: String fvalue = (String)customItem.getFieldValue(); 34: 35: 36: String folderName = ""; 37: String docPath = customItem.getDocumentPath(); 38: String currentLib = ""; 39: String libraries =""; 40: 41: Workspace usersWorkspace = (Workspace) pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY);

332 of 439

42: 43: 44: //Need to build the raw data with the tree of folders in the component library 45: String rd = ""; 46: String lib = ""; 47: if (usersWorkspace != null) 48: { 49: 50: if(fvalue.length()>0){ 51: 52: DocumentId folderId; 53: try { 54: folderId = usersWorkspace.createDocumentId(fvalue); 55: Document selectedFolder = usersWorkspace.getById(folderId); 56: DocumentLibrary docLib = selectedFolder.getOwnerLibrary(); 57: 58: //get the current library 59: currentLib = docLib.getName(); 60: 61: //Set the folder name 62: folderName = selectedFolder.getName(); 63: } catch (DocumentIdCreationException e) { 64: // TODO Auto-generated catch block 65: e.printStackTrace(); 66: //Reset the values 67: fvalue = ""; 68: } catch (DocumentRetrievalException e) { 69: // TODO Auto-generated catch block 70: e.printStackTrace(); 71: //Reset the values 72: fvalue = ""; 73: } catch (AuthorizationException e) { 74: // TODO Auto-generated catch block 75: e.printStackTrace(); 76: //Reset the values 77: fvalue = ""; 78: } 79: }

333 of 439

80: 81: libraries = "{'identifier': 'libraryName', 'label': 'libraryName', 'items': ["; 82: //Get the current libraries that are avaiable and create a json store 83: for(Iterator<DocumentLibrary> i = usersWorkspace.getDocumentLibraries(); i.hasNext();){ 84: String libraryName = i.next().getName(); 85: libraries = libraries + "{ 'libraryName' : '" + libraryName + "'"; 86: if(i.hasNext()){ 87: libraries = libraries + "},"; 88: } else { 89: libraries = libraries + "}]}"; 90: } 91: } 92: 93: } 94: 95: %> 96: 97: 98: 99: <script language='Javascript'> 100: 101: function myoptionsubmit(){ 102: 103: //Update the field with the holding value 104: document.getElementById('<%=customItem.getFieldName()%>').val ue = document.getElementById('folderID').value 105: 106: } 107: 108: 109: dojo.require("dojo.data.ItemFileReadStore"); 110: dojo.require("dijit.Tree"); 111: dojo.require('dijit.form.Select'); 112: dojo.require("dijit.form.Button"); 113: var treeNum = 0; 114: var treeControl = new Array(); 115: var myTree; 116: var resetTree=true; 117: 118: var clib = "<%=currentLib%>"; 119: 120: 121: function recursiveHunt(lookfor, model, buildme, item) {

334 of 439

122: // console.log(">> recursiveHunt, item ", item, " looking for ", lookfor); 123: var id = model.getIdentity(item); 124: buildme.push(id); 125: if (id == lookfor) { 126: // Return the buildme array, indicating a match was found 127: // console.log("++ FOUND item ", item, " buildme now = ", buildme); 128: return buildme; 129: } 130: for (var idx in item.children) { 131: // start a new branch of buildme, starting with what we have so far 132: var buildmebranch = buildme.slice(0); 133: //console.log("Branching into ", model.store.getValue(item.children[idx], 'name'), ", buildmebranch=", buildmebranch); 134: var r = recursiveHunt(lookfor, model, buildmebranch, item.children[idx]); 135: // If a match was found in that recurse, return it. 136: // This unwinds the recursion on completion. 137: if (r) { 138: return r; 139: } 140: } 141: // Return undefined, indicating no match was found 142: return undefined; 143: } 144: 145: function selectTreeNodeById(tree, lookfor) { 146: //console.log("See model root=", tree.model.root); 147: var buildme = new Array(); 148: var result = recursiveHunt(lookfor, tree.model, buildme, tree.model.root); 149: //console.log("*** FINISHED: result ", result, " buildme ", buildme); 150: //console.dir(result); 151: if (result && result.length > 0) { 152: tree.attr('path', result); 153: } 154: } 155: 156: 157:

335 of 439

158: //Build the dojo tree of folders 159: function fetchChildren(library) { 160: var rawdata; 161: var targetNode = dojo.byId("displayError"); 162: 163: var xhrArgs = { 164: url: "/RiverbendFilesPlugin/JSONResponse", 165: handleAs: "text", 166: content: { libName: library 167: 168: }, 169: load: function(data) { 170: targetNode.innerHTML = ""; 171: buildTree(dojo.fromJson(data), library); 172: }, 173: error: function(error) { 174: targetNode.innerHTML = "No folders found."; 175: if (myTree) { 176: dojo.byId("treeContainer").removeChild(myTree.domNode); 177: resetTree=false; 178: } 179: } 180: }; 181: 182: //Call the asynchronous xhrGet 183: var deferred = dojo.xhrPost(xhrArgs); 184: 185: } 186: 187: function buildTree(rawdata){ 188: 189: var store = new dojo.data.ItemFileReadStore({ 190: data: { 191: identifier: 'id', 192: label: 'label', 193: items: rawdata 194: } 195: }); 196: var treeModel = new dijit.tree.ForestStoreModel({ 197: store: store 198: }); 199: 200: //If this tree has already been created then scratch

336 of 439

201: if (treeNum>0 && resetTree) { 202: //remove the current domNode 203: dojo.byId("treeContainer").removeChild(myTree.domNode); 204: } 205: 206: var holdingField = dojo.byId("folderID"); 207: 208: //Build a new tree 209: myTree = new dijit.Tree({ 210: onClick: function(item, node, evt) { 211: //set the display to be the name of the folder 212: document.getElementById('selectedFolder').innerHTML = item.label[0]; 213: 214: //set the field to be the id of the folder 215: holdingField.value = item.id[0]; 216: }, 217: model: treeModel, 218: id: treeNum, 219: showRoot: false, 220: persist: false 221: }); 222: 223: dojo.byId("treeContainer").appendChild(myTree.domNode); 224: myTree.startup(); 225: selectTreeNodeById(myTree, "<%=fvalue%>"); 226: treeNum = treeNum + 1; 227: resetTree=true; 228: 229: } 230: 231: //Render the list of libraries and update the folders if changed 232: dojo.addOnLoad(function() { 233: 234: var libraries = <%= libraries %>; 235: var myStore = new dojo.data.ItemFileReadStore({ 236: data: libraries 237: });

337 of 439

238: 239: 240: 241: 242: evt) { 243: 244: 245: 246: 247: 248: 249:

var libSelect = new dijit.form.Select({ name: 'libSelect', sortByLabel: false, onChange: function(item, node, fetchChildren(item); } }, "librariesSelect");

libSelect.setStore(myStore, clib);

document.getElementById('selectedFolder').innerHTML = '<%=folderName%>'; 250: 251: 252: }); 253: 254: </script> 255: 256: <style> 257: .tundra .dijitLeaf { 258: background: url("/portal_dojo/v1.4.3/dijit/themes/tundra/images/folderClosed.gif" ) no-repeat scroll 0 0 transparent; 259: } 260: </style> 261: <b>Selected:</b><br/><div id="selectedFolder"><%=folderName%></div><br> 262: <INPUT type="hidden" id="<%=customItem.getFieldName()%>" value="<%=fvalue%>"> 263: <input type="hidden" id="folderID" value="<%=fvalue%>"> 264: <b>Libraries:</b><br/><div id="librariesSelect"></div><br><br> 265: <b>Folders:</b><br/><div id="treeContainer"></div> 266: <div id="displayError"></div> Basically, what this is doing is populating a dojo object with the data being returned from the JSONResponse servlet that we created before. It's beyond the scope of this article to discuss the dojo and json being used, but just know that at a high level this is using dojo to build out the selection mechanism. When you select a folder, it stores the ID of the folder within the content object. One note, the jsp requires the wcm.tld: 1: 2:

<%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %>

We need to import this file into our project. Create the /tld folder in the /WebContent/WEB-INF folder. Once it has been created, copy or import the wcm.tld file from your wcm server into this folder. You can find it in /wp_profile/installedApps/cellname/wcm.ear/ilwwcm.war/WEB-INF/tld folder.

338 of 439

Deploying the Rendering Plugin Code


Now that the code has been created, we need to install to the server. Right click the RiverbendFilesPlugin project, and select export. From the list, select WAR file, then click on next. In the wizard, you have to choose a location. Choose somewhere you can find the file, and name it RiverbendFilesPlugin.war. Click Finish:

Now that we have the .war file, we need to install it. Navigate to your WebSphere Application Server admin console. Navigate to Applications -> New Application. Select New Enterprise Application. On the next page, in the local file section, choose the .war file you just exported:

339 of 439

Click the Next button. Choose the fast path option, then click on Next button. For the Step 1 options, leave the defaults and click Next.

Leveraging the Custom Rendering Plugin


Finally, all we need to do now is create some content to use the custom jsps to populate some values for the folders and files, and then render out the custom rendering plugin code.

Creating the Necessary Authoring Template


Create a new Authoring template named "AT - RiverbendRenderingPlugin", and add 2 elements to the authoring template. Add an HTML element called "HTMLFilesFormat", and a text element called "WCMFiles". For the HTMLFilesFormat, add the following html: 1: 2:

<a target="" title="" href="FILEURL">FILENAME</a><br/>

340 of 439

Also, in the properties for the WCMFiles element, add the following for the path to the custom JSP: 1: 2:

/RiverbendFilesPlugin;/jsp/html/showFolders.jsp

Save and close the authoring template.

Creating the Necessary Presentation Template


For the presentation template, we will place the custom rendering plugin tag. Create a new presentation template, named "PT - RiverbendRenderingPlugin". In the Presentation Markup, put the following code: 1: 2: [Plugin:WCMFiles update="true" htmlcomponent="[Element context='current' type='content' key='HTMLFilesFormat']" folderid="[Element context='current' type='content' key='WCMFiles']"]

Save and close the presentation template.

Creating the Folder and File Resource Component


In order to display the rendering plugin, we need to create a folder and place some files within it. Navigate to the Riverbend library in the WCM Authoring Portlet, and then to the Components directory. Click New -> Folder, name it RiverbendFiles. Save and close the folder. Then, create 2 file resource components within this folder. Name them RiverbendFile1 and RiverbendFile2:

341 of 439

Creating the Necessary Site Area and Content


To render the tag now we have to create a content object to be used for the rendering plugin html. Create a new Site Area named "RiverbendRenderingPlugin". Map the AT RiverbendRenderingPlugin authoring template to the PT - RiverbendRenderingPlugin presentation template, then save and close the site area. Next, create a new piece of content, using the AT - RiverbendRenderingPlugin authoring template. Name the content whatever you wish, and select a workflow. In the WCMFiles, note you see the drop down showing the possible libraries. Select the Riverbend library, and then the RiverbendFiles folder:

Finally, save and publish the content. Then, when we render the content:

4.3.3. Wrapping it up
In this example, we showed how to integrate and render custom rendering plugins, which are a powerful tool to enhance your WCM environment. Additionally, the technique of using custom JSP within authoring template elements was explored.

4.4. Social media support


Social capabilities are a key component of a successful content based portal. WCM includes a powerful set of social capabilities that allow site designers to create an engaging experience by incorporating features such as blog, wikis, tag clouds, ratings or social toolbars without investing a lot of time in development. This section covers social media features supported in WCM including blogs, wikis, tags, and social toolbars.

342 of 439

4.4.1. Blogs and wikis


Blogs and wikis are collaborative editing tools that allow end users or communities to publish information on a web site in a easy and quick way. WCM includes a set of site templates that allow site managers to add blog and wiki features to Web sites. Blogs and wikis Blogs and wiki libraries share common functionality such as a user friendly navigation structure, tagging and rating support and simple rich editing, including the insertion of images and links. Each blog, blog library, and wiki is organized in its own content library and can be integrated into your site, syndicated and managed as any other content resource in WCM.

Blogs
Blogs and blog libraries are often used to provide personal views, opinion, news and commentary pertinent to your intranet and extranet sites. Blogs and blog libraries typically combine text with graphics and links to other blogs and Web sites. You can see an example of a blog in the following screenshot:

In WCM blogs: The entries are arranged in reverse-chronological order, with the newest entry displayed first.

343 of 439

In WCM blogs, readers can post comments about your entries. Users can manage their own blog entries and comment on other blog entries. Readers can tag and rate blogs. Tags added to a blog are automatically linked through the the Tag Center.

Wikis
Wikis also provide the users of a web site with a collaborative authoring environment where they can pull together a set of documentation about a topic. Wikis can be used to share community content created by a group of authors in a collaborative way. Wikis typically combine text with graphics and links to other wikis and Web sites. Users can monitor and manage their own wiki articles. Readers can tag and rate wikis.

4.4.2. Tagging and rating


Tagging and rating is one of the most powerful features of WCM 7. It allow site owners to leverage the knowledge of the site users to organize and prioritize the information and services of a site. Tagging and rating support is based on WCM rendering plugins and can be added to any content type: Adding tagging and rating to web content

Tagging engine
Users can use the tagging engine to help to classify the site content by adding tags to content items, for example, apply the tag "RiverBend" to a page that provides information about the company.

344 of 439

Once content has been tagged, users can view the tags that have been applied to individual content items or search related items that have been tagged with the same terms. Tags are usually displayed as a cloud, using a bigger and darker font to mark the most used tags.

WCM provides an automatic generated tag cloud for users to browse the tags used on a site: The tag cloud lists the tags in alphabetical order. Different font sizes and colors indicate how often the tags have been applied. Depending on how the administrator has configured the tag cloud, the list can be from across the portal or limited to particular items, for example, portal pages, or books available on the page where the user clicked the tag. Users can switch between different display modes. For example, they can have the tags displayed in a cloud as described above, or in a simple list. When users work with the list of resources, they can have the list sorted by different criteria, for example, title, date, rating. The result list portlet also supports two different view modes: a summary and a detail view.

Rating engine
The rating engine allows the site users to find the most relevant content in a site by applying ratings to individual resources to show how much they rate or "like" them. For example, a user can give a good coffee a rating of 4.

345 of 439

Users can change or remove ratings that they applied themselves. For example, a user can update the previous rating 4 to a 5 and view the ratings that they or other users have applied to the same item.

Social toolbars
Social networks are a key channel to deliver your content to a wider audience. By publishing the updates of your content to networks like Twitter, Facebook or Google+ can have a big impact in the number of visits that your site will receive. Social toolbars are a set of buttons that allow authors and visitors to quicly publish a reference to a content item onto many of the most popular social sites on the Web. Social toolbars offen allow you to display a counter of the number of times that an item has been shared in a social network. This picture shows an example of a social toolbar:

There are many social toolbars services available for free on the Internet. Most offer an easy integration method allowing you to embed them in any HTML page by including an HTML fragment like this: 1: 2: <!-- AddThis Button BEGIN --> 3: <div class="addthis_toolbox addthis_default_style "> 4: <a class="addthis_button_preferred_1"></a> 5: <a class="addthis_button_preferred_2"></a> 6: <a class="addthis_button_preferred_3"></a> 7: <a class="addthis_button_preferred_4"></a> 8: <a class="addthis_button_compact"></a> 9: <a class="addthis_counter addthis_bubble_style"></a> 10: </div> 11: <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa4e7836eb3bb0be8d"></script> 12: <!-- AddThis Button END -->
T

The code from this example comes from the AddThis service: Link to AddThis website but any other toolbar provider might be used as long as it uses a similar approach. WCM HTML components provide an easy way to include a social toolbar in any content type while managing it from a central location.

346 of 439

This example shows the code that Riverbend designers created to include a social toolbar in their content items:

Once created, this HTML component can be included in any presentation template to make possible to share the content in any social network.

4.5. Multilingual site management


The IBM Web Content Manager Multilingual Solution (MLS) is a set of extensions to IBM Web Content Manager (WCM) that make it easier to build, maintain and deliver WCM sites in multiple languages. This section briefly introduces multilingual site management and provides links to the existing documentation for more information. MLS also includes a whitepaper, Multilingual Site Management with Lotus Web Content Management Link to multilingual solution , that describes the framework, the deployment and configuration of the extensions, and examples of their use. MLS is designed to work with IBM Web Content Management Version 7.0 and subsequent fix packs/feature packs only. The set of extensions consist of the following: An Authoring Plug-in (aka Custom Fields) to display information about associated language translations A number of Workflow Synchronization Plug-ins (aka Custom Workflow Actions) to automate the creation of translated documents and handle publishing, expiry and delete synchronization of those documents A number of Rendering Plug-ins (aka LRP Context Processor and Servlet JSPs) to enable end-users to see content in the right language and allow switching between languages A Library Copy Portlet to make it easier to deploy new translated versions of existing sites

For more details, refer to the linked asset in the Portal Solutions Catalog. Link to
multilingual solution .

347 of 439

Part 5. Site administration and operations


The previous parts of this guide describe how to design and build a website using IBM Web Content Manager (WCM). In part 5, we cover topics on site administration and operations. Ideally users performing these activities should possess knowledge on how to build WCM websites as this will enable the site to be administered more effectively. Part 5 covers the following topics: 5.1 Library management Administrators can create new web content libraries, delete and disable libraries that are no longer required and unlock libraries that have been locked as a result of a long running task. Web content libraries can be secured by setting the access control appropriately. Exporting and importing web content libraries allows you make a backup copy and move web content libraries across different WCM servers. Administrators can also maintain versions of items and restore versions of items if required. 5.2 Syndication Syndication is the method used by IBM Web Content Manager to replicate data from a web content library on one server to a web content library on another server. 5.3 Web content maintenance Administrators can use tools like the member fixer, update security task, workflow update tool, clear history items and clear versions to maintain the web content libraries in their environment. Cloning a web content repository can also help speed the process of moving large web content libraries between WCM servers. Each of these tools will be described in detail in this section. 5.4 Web content feed management Web Content Integrator (WCI) can consume RSS feeds (that extend the WCI specification) and create WCM content. WCM provides administrators with the ability to create feed configurations and feed jobs that can run on schedule to consume the RSS feeds. This section describes the web content feed management features available to the administrator. 5.5 Caching IBM Web Content Manager generated Web pages and content from external data sources can be cached by the Web Content Manager application. If utilized correctly, Web Content Manager caching can dramatically increase the performance of a site. This section provides details on how to configure WCM Caching. 5.6 Deployment WCM sites can be delivered using the Rendering Portlet. The Rendering Portlet can be used to pull content from the local WCM server, or through a remote server using Web Services for Remote Portlets (WSRP). Standalone WCM sites can be delivered using the WCM (connect) servlet and static websites can be delivered using the WCM prerendering process. This section describes each delivery option in detail. 5.7 Troubleshooting IBM Web Content Manager writes information, warning and error message to logs during configuration and at real time that will aid in troubleshooting If experiencing a problem. This section provides details on troubleshooting.

348 of 439

5.1. Library management


Administrators can create new web content libraries, delete and disable libraries that are no longer required and unlock libraries that have been locked as a result of a long running task. Web content libraries can be secured by setting the access control appropriately. Exporting and importing web content libraries allows you to make a backup copy and move web content libraries across different WCM servers. Administrators can also maintain versions of items and restore versions of items if required. This section covers the various library management activities in detail. Note: Only administrators can perform library management tasks described in this section.

What is a web content library?


A web content library is a container that stores all the IBM Web Content Manager artefacts such as the Site Areas, Authoring Templates, Presentation Template, Projects, Components, Taxonomy, Category, Workflow etc. A web site can be designed to comprise of a single web content library or multiple web content libraries. It is common practise to have a design library which stores the design components and a content library which stores the content items. Access control is configured on each web content library. An administrator can maintain web content libraries from the WebSpere Portal Administration portlet as shown in the screen below. By default, WCM Version 7 contains a Web Content library, blog template related libraries, and wiki template related libraries. Note: It is recommended not to use the default Web Content library because you cannot syndicate this default library to other WCM environments.

349 of 439

Actions to manage web content libraries


There are several actions available for an administrator to manage the web content libraries.

Search a web content library


An administrator can search for a web content library as shown below.

If the WCM environment has many WCM libraries, you can set the search option to search the specific WCM library you want to manage. The Search by drop down field provides the following options: Name contains (selected by default) Name starts with All available

Create a new web content library


Use this action to create a new web content library.

View locked items in the web content library


Use this action to view the locked items in the web content library.

This is a very useful action that allows the administrator to identify all the WCM items that are locked by users (authors or web developers) across all the WCM libraries. The administrator also has the ability to unlock the selected items from the result view.

System reports
Use this action to display a list of WCM library deletion reports. These reports can be viewed and deleted if required.

350 of 439

Set Access on Root


Use this action to assign user access to the JCR content root node and thus allow the users to work with web content libraries.

Refresh
Use this action to refresh the web content libraries portlet.

For instance, when a WCM library is deleted, the deleted library will still continue to appear in the Web Content libraries portlet with the library status Deleting. Using the Refresh action clears the deleted WCM library from the Web Content libraries portlet view.

Edit library settings


Use this action to edit the selected WCM library.

Set library permissions


Use this action to set access permissions on the selected WCM library.

Library resources
Use this action to set access permissions to the library resources on the selected WCM library. This controls the access to the views and actions available from within the WCM authoring portlet.

Delete library
Use this action to delete the selected WCM library. This action will be disabled if the WCM library is configured to be prohibited from being deleted.

Additional tasks
Use this action to perform version management related tasks on the WCM library.

351 of 439

5.1.1. Creating a new web content library


This section walks you through the steps of creating a new WCM library. As an administrator, follow these steps to create a new WCM library: Use the Create new Library action and fill in the Web content library name and Description. The Localizations feature can be used to display a translated version of the library name.

1.

2. Select a Language from the dropdown field. 3. If the checkbox Prohibit library from being deleted is enabled, the Delete Libraries action available in the Web Content libraries portlet will be disabled for the respective library. 4. Select the Enabled checkbox to use the WCM library in the Authoring portlet. If the checkbox Enabled is disabled, this WCM library will not be available in the library selection list in the WCM Authoring portlet. If you want to prevent any changes being made to items stored in a library, but would like those items to still appear on a rendered site, you should disable the library instead. 5. If the checkbox Include default items in the new library is enabled, a set of default web content items will be created. 6. Click OK to create the new web content library.

352 of 439

The screenshot below shows the newly created web content library.

5.1.2. Web content library access control


WCM access and security can be set at the following levels: Library level Security defined at the library level determines who can access the library. If a user does not have access to the library, the user will not be able to see any items that are contained in the library. A user requires a minimum of "Contributor" access to a library to be able to view this library from the authoring portlet. Item type (authoring portlet views and tasks) in a library Setting access at the item type level within a library allows you to define the views and tasks a user can see and access from within the authoring portlet. Note this does not give users access to the individual items. Users will still require the right access level on the individual items itself. A user who is assigned access to an item can always view that item in the All Items view regardless of whether they have access to the related item type view. Item level Security defined at the item level determines the actions a user can perform on the item. A user who only has read access on the item will not be able to edit the item.

This section covers the details of setting access at library level and at the item type in a library. First, let's identify the various roles available within WCM and the two techniques (additive and subtractive) to set access to the WCM library.

353 of 439

WCM roles
WCM v7 identifies a set of roles and each role has certain capabilities. The table below describes these roles along with their capabilities from within the WCM authoring portlet. Roles User Rendering and authoring portlet access rights User and groups assigned to this role can: view items in a website or rendering portlet that they have been assigned at least user access User and groups assigned to this role can: view items in a rendering portlet or servlet-rendered website that they have been assigned at least user access view libraries the they have been assigned contributor access to in an authoring portlet access the "My Items" and "All Items" views in an authoring portlet for libraries that they have been assigned contributor access access the item type view within the authoring portlet for item types that they been assigned at least user access User and groups assigned to this role can: view items in a rendering portlet or servlet-rendered website that they have been assigned at least user access view libraries the they have been assigned contributor access to in an authoring portlet access the "My Items" and "All Items" views in an authoring portlet for libraries that they have been assigned at least contributor access for library item types that user and groups have been assigned at least editor access to, editors can have access to (perform) the following actions in the authoring portlet: * access the item type view * create a new item * add/remove links * apply authoring template * copy * delete * edit * link to * move * restore a version * edit version labels User and groups assigned to this role can: view items in a rendering portlet or servlet-rendered website that they have been assigned at least user access

Contributor

Editor

Manager

354 of 439

view libraries the they have been assigned contributor access to in an authoring portlet access the "My Items" and "All Items" views in an authoring portlet for libraries that they have been assigned at least contributor access for library item types that they have been assigned manager access to, managers can access the all of the actions available to editors and also the following actions in the authoring portlet: * edit access settings * next stage * purge * unlock * edit user profile User and groups assigned to this role can:

Administrator

view items in a rendering portlet or servlet-rendered website that they have been assigned at least user access view libraries the they have been assigned contributor access to in an authoring portlet access the "My Items" and "All Items" views in an authoring portlet for libraries that they have been assigned at least contributor access all actions in the authoring portlet for library item types that they have been assigned administrator access These roles have no access to Web Content Manager items

Security Administrator Delegator Privileged User

The following table describes the pre-defined groups that can be assigned roles in a WCM library.

Pre-Defined Group Anonymous portal user All Authenticated Portal Users Users and User Groups All Portal User Groups

Description Select this user to assign a role to anonymous users Select this group to assign a role to users that have logged on to your server Select this group to assign a role to all users and groups Select this group to assign a role to all groups

355 of 439

Additive and subtractive method


There are two techniques available to set access, additive and subtractive.

Additive method
With the additive method, you begin with assigning a user or a group with the lowest possible privileges at the WCM library level and then increase their access rights by assigning them with the higher privileges for specific WCM items.

Subtractive method
With the subtractive method, you begin with assigning a user or a group with higher privileges at the WCM library level and then reducing their access rights at specific WCM object level and de-selecting the inheritance option.

Setting access permissions on the WCM library


Setting access permissions on the WCM library will allow you to control who has access to the WCM Library. To apply access permissions to a WCM library, as an administrator use the Set action available for the WCM library in the Web Content Libraries view. Permissions The screen shot below illustrates the Resource Permissions portlet that loads up when the Set Permissions action is used.

The Resource Permissions page displays the list of Roles, Allow Propagation option, Allow Inheritance option and the action to Edit Roles. Note: Making any changes to the Allow Propagation option and the Allow Inheritance option requires you to use Apply action to ensure your change is applied.

356 of 439

Note: The Display/Modify Owner link is not applicable in the WCM context. To assign a user or a group with the appropriate Roles, use the respective Edit Roles action. The screen shot below illustrates an example of the page that loads up when the Edit Roles action is used to add new Users to the WCM library. In this example, the All Authenticated Portal Users group (see table Pre-Defined Groups above) has already been allocated the User role. You can add additional users/groups by using the Add action. You can also delete the users/groups by using the Delete Inherited column displays if the user/group has inherited the current role. action. The

Setting access permissions on the WCM authoring portlet tasks and views
Setting access permissions on the WCM authoring portlet tasks and views will allow you to control who has access to the various tasks and views from within the WCM authoring portlet. Note that the permissions set for item types in this manner do not automatically give you access to individual items. To apply access permissions to a WCM item type, as an administrator use the Library action available for the WCM library in the Web Content Libraries view. The resources screen shot below illustrates the Library Resources portlet that loads up when the Library resources action is used.

357 of 439

You can control access to the following WCM item types: Authoring Template Components Content Presentation Template Site and Site Areas Taxonomies and Categories Workflow and workflow elements

To apply access permissions to a WCM item type, as an administrator use the Set Permissions action available for the WCM library in the Library Resource view. The screen shot below illustrates the Resource Permissions portlet that loads up when the Set Permissions action is used.

As you can see, this is the same Resource Permissions portlet that has been described in the section Setting Access Permissions on the WCM Library above. Follow the same instructions to add access permissions to the individual WCM item types.

Item level security inheritance


The default behavior of item level security inheritance is that each roles access is automatically inherited down to each item in a library. To disable this automatic inheritance, use the WebSphere Application Server administration console to change the value of the following property in the WCM WCMConfigService service: default.inherit.permissions.enabled Set the value to false. You need to restart WebSphere Portal to enable any configuration changes made to this file. Note: Please note that disabling inheritance at the server level is not recommended as it may impact performance.

358 of 439

To prevent a user or group from automatically having inherited access to an item, turn off inheritance on that item. You can allow assigned roles to be inherited from parent items up to and including the library. The access roles are inherited in the following hierarchies: Library -> Site -> Site area -> Content item Library -> Taxonomy -> Category Library -> Folder -> Component Library -> Folder -> Authoring Template Library -> Folder -> Presentation Template Library -> Workflow Library -> Workflow Stage Library -> Workflow Action You can stop inheritance at any point in an inheritance hierarchy. For example, you can allow inheritance down to a site area, but assign access roles manually for each content item under that site area. Inheritance from a library is based on the role assigned to the overall library, not on the role assigned to specific item types. For example, you may not have access to the presentation template view on a library, but if you inherit the role of editor to a presentation template, you can view and edit that presentation template from the All Items view. Note: Inheritance does not apply to draft items.

5.1.3. Version management


Web content management systems require a version control feature to ensure multiple versions of items can be created and restored as necessary. In this section, we describe the version control features available with WCM v7. WCM's version feature does not take a "snap-shot" of the entire WCM site. Versioning occurs only at the item level. Any hierarchical relationships to other items are not saved. For example, if you save a version of a site area that has child site areas and you delete the child site areas, the child site areas will not be restored if you restore the parent site area. You cannot create versions of external resources which are linked from within WCM items because WCM does not store a copy of the external resources in the version index. Note: The name of an item is independent of version control so changing the name of an item version will reflect the change of name across all versions of that item.

Creating an item version


With WCM v7, versions of items can be created by the following two method: Creating an item version automatically Creating an item version manually

359 of 439

Creating an item version automatically


By default, the WCM environment is configured to create an item version automatically. An item version is saved each time you save an item, or if the item is participating in a workflow, each time the item's state changes to published. Note: You cannot save versions of draft items.

Creating an item version manually


If manual versioning is enabled, users with editor access or above can manually save versions of published items. You can restore a version by viewing an item's version history and selecting a version to restore.

Configuring version control


You can change this default behavior by modifying the following WCM WCMConfigService service properties: versioningStrategy.Default versioningStrategy.AuthoringTemplate versioningStrategy.Component versioningStrategy.Content versioningStrategy.PresentationTemplate versioningStrategy.SiteArea versioningStrategy.Taxonomy versioningStrategy.Workflow Each property can be set to one the following values: always: This value is set by default and will create item versions automatically. never: This value will disable the version feature. manual: This value will configure version control to be a manual task.

Each property applies to an individual item type thus allowing you to control the versioning behavior at the item type level. It is best practice to disable automatic versioning if it is not required otherwise the WCM authoring performance can be adversely affected. The screenshot below shows the IBM WebSphere Application Server administration console and highlights the versioning properties available under the WCM WCMConfigService service.

360 of 439

Restore an item version


In this section, we walk through the process of restoring an item version. In our example, we have a presentation template that we would like to restore to a previous version. Follow these steps to restore a previous verison of a presentation template: 1. As an administrator, open the presentation template in read mode from the authoring portlet and click on the More Actions drop down menu and then click on Versions action as shown in the screenshot below.

361 of 439

2.

The Current versions portlet displays all the versions available for the current item. We select the first version and then use the Restore action version of the presentation template. The Read action you can Restore it. The Edit Label action item version. The Delete action to restore the previous

available allows you you view the selected item version before

allows you to add a meaningful label to selected the

will delete the selected item version.

3. Once the item is restored you will receive confirmation that the item was restored to the selected version.

Version management at library level


As an administrator use the Additional tasks action for the WCM library in the Web Content Libraries view to access version management features available at the library level. The screen shot below illustrates the Additional tasks portlet.

362 of 439

Apply version label


This action is used to apply a label to the most recent versions of all items in a library. Note this action does not create a new version of items. Note also that you can only label one set of items at a time. If you are labelling many items, this action may take some time and hence you cannot execute a second label request until the first request has been completed. Note: Labels provided to items are not syndicated to the subscriber.

Restore all by date


This action is used to restore the most recent version of all items in a library saved before the specified date and time. The date and time selected here are based on the time zone of the WCM server you are accessing, not the time zone of the computer you are using.

Restore all by label


This action is used to restore all items that match the specified label. Note: The following applies to the two restore all actions described above: You can only restore one set of items at a time. If you are restoring many items this action may take some time and hence you cannot execute a second restore request until the first request has been completed. You cannot use the restore action if you have locked items in the library. When restoring items that contain links or references to other items, you will be prompted to select a new item to link or reference if the original item does not exists.

View report
This action displays a report of the respective task that you selected to view the report against.

363 of 439

5.1.4. Exporting and importing libraries


WCM provides a capability to manually export a web content library to disk from a source environment and then manually import it to a target environment. This capability allows you to take backup of web content libraries and is also used to move web content libraries between environments. The web content library export and import process cannot be used to send item updates, deletes and moves between environments. It is only suitable for populating new items. WCM v7 permits exporting and importing web content libraries between different versions of WCM provided the following criteria is met: The WCM environment exporting the web content library is a lower version than the WCM environment importing the web content library. It is not possible to import libraries from WCM versions before 6.1.0.2. Examples: It is possible to import a library exported from WCM version 6.1.0.2 into WCM version 7.0.x It is not possible to import a library exported from WCM version 7.0.x into version 6.1.0.2

Syndication versus the export and Import process


WCM syndication is designed to automatically replicate items between two WCM environments and keep them synchronized. Even though the web content library export and import process can be used to move web content libraries between two WCM environments, it does not replace the WCM syndication process for the following reasons: Syndication process can be used to send updates, deletes and moves whereas the export and import process is only suitable for populating new items. The export and import process only exports the current version of each item. If an item has multiple versions, they will not be exported. The export and import process will only export and import a child item when its parent item is successfully exported and imported. The export and import process will overwrite an item with the same path, name and ID on the target server. The export and import process does not change the Web content library and item level access controls on the target WCM environment. You need to run the member fixer tool on the imported library to fix references to missing users and groups on the target WCM environment. The export and import process cannot be used to import an item if an item on the target server has the same ID but a different parent than the item being imported.

Configuring the export and import process


Configuring the export and import process properties can be done from the IBM WebSphere Application Server administration console:

364 of 439

1. As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following: Resources -> Resource Environment -> Resource Environment Providers -> WCM WCMConfigService.

2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as shown in the screenshot below.

365 of 439

Export process properties


Set or update the following properties on the server where you will run the export process: 1. export.libraryname Set this property to be the name of the web content library to transfer. If exporting multiple libraries enter each library name separated by a semi-colon. Example: export.library=Lib01;Lib02;Lib03 2. export.directory Default value is set to ${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/system/export. Set this property to the directory name on the source server where the exported data will be written. The export task creates a subdirectory with the name corresponding to library name within this directory for each exported library. 3. export.singledirectory The accepted values are either true or false. If set to true, multiple libraries are written into a single directory specified by the export.directory property. If set to false, the export task created subdirectories with the name corresponding to each exported library names. Note: Changing any of these properties requires a server restart to reflect the new values.

366 of 439

Import process properties


Set or update the following properties on the server where you will run the import process: 1. import.directory Default value is set to ${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/system/import. Set this property to the directory name on the target server from where the exported data is read when importing the data to the target server. Note: If exporting and importing across a network, this property can be the same directory as the one specified in export.directory property. Otherwise, you must copy the exported data from the location specified in the export.directory property to the location specified in the import.directory property before running the import task. If the export.singledirectory property was set to true when you exported your libraries, specify the parent directory where all the exported libraries are located. If the export.singledirectory property was set to false when you exported your libraries, or if you only want to import specific libraries, then list the directory of each library separated by semicolons. Example: c:\import\Lib01;c:\import\Lib02;c:\import\Lib03. If using the Linux platform use /; to separate each library, such as /opt/importdata/Lib01/;/opt/importdata/Lib02/;/opt/importdata/Lib03. Note: Changing any of these properties requires a server restart to reflect the new values.

367 of 439

Running the export process


Complete the following steps to run the export process on the source server: 1. Open a command prompt and navigate to the following directory: /ConfigEngine 2. Run the command: On Windows: ConfigEngine.bat export-wcm-data -DWasPassword=password DPortalAdminPwd=password On Linux: ./ConfigEngine.sh export-wcm-data -DWasPassword=password DPortalAdminPwd=password Override the export.directory property defined in the WCM WCMConfigService service by using the -Dexport.directory parameter. Example: ConfigEngine.bat export-wcm-data -Dexport.directory=c:\export Override the export.singledirectory property defined in the WCM WCMConfigService service by using the -Dexport.singledirectory parameter. Example: ConfigEngine.bat export-wcm-data -Dexport.singledirectory=false Override the export.libraryname property defined in the WCM WCMConfigService service by using the -Dexport.libraryname parameter. Example: ConfigEngine.bat export-wcm-data -Dexport.libraryname=libraryname 3. Verify to ensure that the export process was completed successfully. Check to ensure the export directories were created correctly. 4. Copy the exported data from the location specified in the export.directory property of the source server to the target server location specified in the import.directory property

Running the Import process


Complete the following steps to run the import process on the target server: 1. Open a command prompt and navigate to the following directory: /ConfigEngine 2. Run the command: On Windows: ConfigEngine.bat import-wcm-data -DWasPassword=password DPortalAdminPwd=password On Linux: ./ConfigEngine.sh import-wcm-data -DWasPassword=password DPortalAdminPwd=password Override the import.directory property defined in the WCM WCMConfigService service by using the -Dimport.directory parameter. Example: ConfigEngine.bat import-wcm-data Dimport.directory=c:\import\Lib01;c:\import\Lib02;c:\import\Lib03 Verify that the import process has completed successfully by reviewing the list of libraries listed in the web content libraries section of the administration portlet on the target server. Reset the web content event log. Restart the server. Run the member fixer tool if necessary to fix references to missing users and groups on the target WCM environment.

3.

4. 5. 6.

368 of 439

Tips on importing large web content libraries


Follow these tips when importing large web content libraries: 1. Disable JCR text search indexing on your WebSphere Portal server before exporting or importing large libraries. This will reduce the load on the database during the export and import process. To disable the JCR text search, edit the /PortalServer/jcr/lib/com/ibm/icm/icm.properties file and set the jcr.textsearch.enabled property to false. Restart the server for the change to take effect. After the export or import process has successfully completed, you must enable the JCR text search by changing the jcr.textsearch.enabled property to true. Please note that rebuilding the indexes can take some time. 2. When uploading large libraries, ensure that there is sufficient disk space to accommodate the import. The location of the temporary directory is specified by the jcr.binaryValueFileDir property in the /PortalServer/jcr/lib/com/ibm/icm/icm.properties file.

5.1.5. Deleting existing web content libraries


WCM libraries can be deleted when they are no longer required. You need to have administrative rights to delete a WCM library. Deleting a WCM library only deletes it on the environment that the delete process was triggered. Any other environments containing a syndicated copy of this WCM library will not be deleted. Note: A library cannot be deleted if there are references to items in the library being deleted from items in other libraries.

369 of 439

As an administrator, follow these steps to delete a WCM library using the Web Content Libraries portlet: 1. Click on the Delete Library delete. action available against the WCM library you want to

2. You will be prompted with a dialog box to confirm this operation. Click OK.

3. The screen shot below illustrates the screen visible after the delete action was triggered on the Test library. Notice the view displays the status Deleting against this library.

370 of 439

4. Use the System Reports was deleted.

action to see a report on this library that

371 of 439

5. Use the View Report action to view the report of the delete operation.

5.1.6. Disabling existing web content libraries


A web content library can be disabled when it is not required. Disabling the web content library prevents it from being accessed from the authoring portlet. Users cannot make any updates to any items stored in the library. Any items referenced from this library are still rendered in web content. As an administrator, follow these steps to disable a WCM library using the Web Content Libraries portlet:
1.

Click on the Edit Library disable.

action available against the WCM library you want to

372 of 439

2. Disable the checkbox Enabled as shown in the screenshot below and click OK.

3. The Web Content Libraries portlet now displays the library status to be Disabled and will no longer be available for selection from the authoring portlet.

5.1.7. Unlocking a web content library


There are a lot of system administrative tasks that can be performed on a web content library. In rare occasions, a library can get locked when a long running task fails to unlock it. In such situations, you can use the unlock library tool to unlock the web content library. The unlock library tool needs to be enabled by adding the following properties to the WCM WCMConfigService service using the IBM WebSphere Application Server administration console:

373 of 439

connect.businesslogic.module.unlocklibrary.class=com.aptrix.pluto.security.UnlockLi braryModule connect.businesslogic.module.unlocklibrary.remoteaccess=true connect.businesslogic.module.unlocklibrary.autoload=false

Restart the server for these changes to take effect. To run the unlock library module, use the following URL: http://[hostname]:[port_number]/wps/wcm/connect?MOD=UnlockLibrary&library=libraryna me Log in as the Portal administrator when prompted to do so.

5.2. Syndication
Syndication is the method used by IBM Web Content Manager (WCM) to replicate data from a web content library on one server to a web content library on another server. This section introduces syndication and covers the various syndication methods, syndication relationships, and other related topics.

Introduction
IBM Web Content Manager facilitates an environment to design, author and maintain web content. A WCM deployment usually comprises more than one WCM server. For example: One WCM Authoring server, one WCM staging server and one WCM delivery server. A Web Content library on a server can be replicated between all the WCM server using WCM syndication. The source WCM server where content is replicated from is known as at the Syndicator

374 of 439

and the target WCM server where content is replicated to is known as the Subscriber. Syndication is based on the Information and Content Exchange (ICE) protocol, an XMLbased protocol using HTTP as its transport mechanism. Reference: An additional detail about the workings of the ICE protocol is available in the IBM Developerworks article Understanding syndication in IBM Workplace Web Content Management. URL: http://www.ibm.com/developerworks/lotus/library/wwcm-syndication/

Syndication methods
All the items you work with as part of your WCM authoring environment (templates, components, content items, and so forth) are stored in WCM libraries. Syndication takes place at the WCM library level and replicates from the selected WCM library or libraries from the syndicator to the subscriber. There are three syndication methods available when configuring a syndication relationship: Live items syndication Live and projects syndication All items syndication

Live items
Live item syndication is mostly used when syndicating to a staging or delivery server. The following items are syndicated: Published Expired

Draft items, projects and items in a project are not syndicated.

Live and projects


The advantage of using "Live and projects" syndication is to gradually syndicate projects to a staging or delivery server rather that waiting to syndicate all the items in a project after they all achieve a published state. The following items are syndicated: Published Expired Projects Draft items in a project

Draft items outside of projects are not syndicated.

All items
All item syndication is mostly used when syndicating between servers within an authoring environment. The following items are syndicated:

375 of 439

Published Expired Projects Draft items in a project Other draft items Versions Deleted items

Syndication relationships
WCM library planning should consider how you plan to syndicate libraries between WCM instances. Planning WCM libraries should be done during the information architecture planning stage. Syndication relationships can be of the following kinds: One way relationship Two way relationship Multiple relationships

One way relationship


In a one way syndication relationship, the WCM libraries are always replicated from the Syndicator to the Subscriber in one direction. This type of setup is used when the content creation is restricted to one environment. The following figure illustrates the one way syndication relationship.

Two way relationship


In a two way syndication relationship, the WCM libraries can be syndicated in both directions. When enabling two-way syndication relationship, you must first establish the syndication relationship from the source WCM instance to the target WCM instance. Once the libraries have been replicated to the target WCM instance, you can set up another syndication relationship for syndicating the content in the opposite direction. Note: You must use a consistent syndication strategy. For example, if syndicating "All items", then both syndication relationships must be syndicating "All items".

376 of 439

The following figure illustrates the two way syndication relationship.

Multiple relationship
In a multiple syndication relationship, you can have a WCM instance subscribe WCM libraries from multiple WCM instances as illustrated in the figure below. An example of where this setup could be used - if you have multiple WCM authoring instances in multiple locations and a single WCM delivery instance, you can use multiple syndication relationships to syndicate content to a single WCM delivery instance. The following figure illustrates multiple syndication relationships.

Important things to remember regarding syndication


There are several items to keep in mind when configuring and working with syndication: Version consistency First time syndication on a new library Access control when syndicating and User consistency Additional things to remember (see the list below)

377 of 439

Version consistency
All servers participating in syndication must be of the same version for syndication to work as expected and to be in a supported state. Syndication is not supported between versions. For example: Server A with version 7.0.0.0 can be syndicated to Server B with version 7.0.0.1 installed. Server A with version 7.0.0.0 can be syndicated to Server B with version 7.0.1 installed. Server A with version 7.0.1 can be syndicated to Server B with version 7.0.0.0 installed. Syndicating Server A with version 6.1.5 to Server B with version 7.0.0.0 installed is not supported. Syndicating Server A with version 7.0.0.0 to Server B with version 6.1.5 installed is not supported.

First time syndication on a new library


First-time syndication to an existing library is not supported. Attempting to syndicate a library to a subscriber that already has a library with the same name will result in an exception. Although the libraries have the same name, they have different UUIDs. Access control settings are not part of syndication, and hence you must manually set access permissions on the subscriber's library when syndicating for the first time. If the library does not exist on the subscriber, it will be created during syndication. By default, no access control settings are specified on the new library, so you must set them manually before users can access content in the new library. It is not required that the settings on the subscriber's library match those on the Syndicators library, because you might want to provide different access for users on the subscribing server.

Access control when syndicating and User consistency


Although syndication can be used to keep data synchronize between libraries on different servers, access control settings for the libraries are not included as part of syndication. For user level access to remain consistent between the syndicator and subscriber, both servers must be configured to use the same user repository unless access controls are determined by only using virtual users and groups, such as "All authenticated" and "Anonymous Users". If different user repositories are used, syndication will occur but with there will be errors in the subscriber log indicating missing users.

Additional things to remember


Other things to remember when configuring and working with syndication: Information about a Library is only syndicated the first time syndication occurs and not on subsequent updates and rebuilds. If a library is renamed or library user access is changed, this information is not syndicated to the Subscriber. If you change the name of a library or change user access to a library, you will need to manually make the same changes to any subscriber libraries if you want the same settings on all your syndicated libraries. If content from one library (Library A) uses an item from another library (Library B), you must include both libraries in the Syndicator to ensure that all items are

378 of 439

syndicated successfully. If you only include Library A in the Syndicator, any items in Library A that reference items in Library B are not syndicated, and syndication errors are generated. If you add a new library to a Syndicator after the initial syndication you will need to click Update to force the new library to be syndicated immediately. If you intend to syndicate a library that contains more than 10000 items, update the maximum Java heap size (at least 1024 MB) used by the portal application server on the subscriber machine. Although it is possible to set up more than one syndication relationship between the same WCM instances, there is no reason to do so. The additional syndication relationships are not required. WCM Event Log is a database table that was created to track changes made to all objects within WCM. This table is separate from the main WCM object library. The Event Log stores attributes about each WCM object. The Event Log can be used to flag candidates for syndication based on the lastModified date, the item gatherer and the library in which the object resides. An item will fail to syndicate if an item it references has been deleted (but not purged). Purge the deletion and rebuild the subscription so that the deleted item is resent. Switching from "all item" syndication to "live item" syndication: When you switch from "all item" syndication to "live and projects" syndication or "live item" syndication, any drafts previously syndicated to the subscriber are not removed. If you move a draft item from a library using "all item" syndication to a library using "live item" syndication, the draft item will also be moved on the subscriber because the action occurred on the library using "all item" syndication. This behavior allows for some draft items to be included in a subscriber library even though "live item" syndication is being used.

5.2.1. Configuring WCM syndication


Before we dive into the details of setting up a Syndicator Subscriber relationship, it is helpful to understand the configurations settings available to control the syndication process.

Syndication interval
To set up syndication interval, use the following property: Property name = deployment.itemChangedTaskDelay Default value = 30 (seconds) Possible values = 0 (seconds) to 65536 (seconds)

Use this property to change the syndication interval to better suit the needs of your environment. For example, you might shorten the interval in an active authoring environment where users must collaborate heavily and rely on timely replication. Similarly you might lengthen the interval to avoid excessive replication of data that does not change often. A value of 0 will prevent syndication from occurring. If the interval is too short for syndication to complete before the interval expires, syndication will begin again as soon as the previous syndication completes.

379 of 439

Disabling automatic syndication


To disable automatic syndication, use the following property: Property name = connect.moduleconfig.syndication.inittasks Default value = true Possible values = true or false

Syndication is configured to run automatically by default. You can disable automatic syndication and rely only on manual syndication to have complete control over when syndication occurs. To disable automatic syndication, change the value of this property to false.

Subscriber-only server
To set up subscriber-only server, use the following property: Property name = deployment.subscriberOnly Default value = false Possible values = true or false

A syndicator server uses several processes to gather and queue content for syndication. These processes can sometimes impact server performance when running. However, a subscriber-only server does not require these processes, so performance can be improved on the subscriber-only server by disabling the processes. To configure a subscriber only server, change the value of this property to true.

Subscriber reporting
To set up subscriber reporting, use the following property: Property name = deployment.enableReport Default value = false Possible values = true or false

This enables high level reporting of syndication to the SystemOut.log file on the Subscriber server. It provides a summary of items that were processed, and which items failed syndication to help you troubleshoot syndication issues. To enable subscriber reporting set this property value to true.

Modifying syndication configurations setting


To modify the settings, access the WebSphere Application Server administration console and navigate to Resource environment providers, WCM WCMConfigService. These configuration options are specified under Custom properties section and can be updated to the desired settings. Alternately you can uncomment and update the desired property in the WCMConfigService.properties file in \PortalServer\wcm\shared\app\config\wcmservices directory and then run the config task

380 of 439

update-wcm-service-properties. Refer to the IBM Web Content Manager Infocenter for more details. URL : www.lotus.com/ldd/portalwiki.nsf/dx/xpViewCategories.xsp?lookupName=IBM%20Web%20Content %20Manager%207%20Product%20Documentation
Note:

You will need to restart WebSphere Portal to enable any configuration changes made. When making changes to clustered servers, you will need to ensure the WCM WCMConfigService service section under the Cluster Scope is updated.

5.2.2. WCM syndication example


In this section we describe in detail the steps taken to complete syndication of the RiverBend library from the IBM Web Content Manager (WCM) instance on our lab server wcmwikiauth.itso.ibm.com (Syndicator ) to the WCM instance on lab server wcmwiki.itso.ibm.com( Subscriber ). From now on we will refer to these environments as the Syndicator and Subscriber.

Verify version of IBM Web Content Manager in Syndicator and Subscriber


All servers participating in syndication must be of the same version for syndication to work as expected and to be in a supported state. Syndication is not supported between versions. For example, Syndicating Server A with version 6.1.5 to Server B with version 7.0.0.0 installed is not supported and vice versa. The lab servers used, both the Syndicator and Subscriber are running IBM Web Content Manager 7.0.0.1.

381 of 439

To ensure both the Syndicator WCM instance and Subscriber WCM instance were at the same WCM version we looked at the information available in the following file on both the servers \PortalServer\log\VersionInfo.log. Both the environments are on the same build level, as shown below: 1: 2: IBM WebSphere Portal 7.0.0.1 3: Build Level: wp7001CF06_001_15 (2011-07-19 15:33) 4: Server Name: WebSphere_Portal 5: Started at: 9/10/2011 10:47:42:890 EDT 6: Installed Feature Packs: 7: None 8: Installed FixPacks: 9: WP_PTF_7001 (IBM WebSphere Portal, Version 7.0.0.1 Fix Pack) 10: Installed Interim Fixes: 11: PM41442 (IBM WebSphere Portal, 7.0.0.1-WP-WCM-CombinedCFPM41442-CF006) 12: PM43406 (Cumulative iFix 18 for WCM v7.0.0.1)

Note: Cross fix-pack syndication is now supported in WCM version 7.x onwards. This means a server running 7.0.0.0 could be syndicated with a server running 7.0.0.1.

Verify network connectivity between the Syndicator and Subscriber


Next we check network connectivity between the two servers to ensure both the servers are available on the network. The following figure shows checking the network connectivity from the Subscriber to the Syndicator using the ping command and the ping result.

382 of 439

The following figure shows checking the network connectivity from the Syndicator to the Subscriber using the ping command and the ping result.

Verify the existing WCM libraries in the Syndicator and Subscriber


Log in to the Portal administration portlet as the administrator and access the WebContent Libraries portlet to ensure the list of WCM libraries available in the two WCM instances. We did this on both the environments using two browser instances. The screenshots below illustrates this. Web Content Libraries on the Syndicator: The Syndicator has three additional libraries Redbooks2011, Sample and Sample Library as shown in the screenshot below in addition to the out of box library.

Web Content Libraries on the Subscriber: The Subscriber has the default libraries as shown in the screenshot below. Notice the subscriber does not have the additional libraries shown on the Syndicator.

383 of 439

Create a Credential Vault slot to connect to Syndicator


Starting from WCM V7 and later we must create a Credential Vault Slot to allow access to the Syndicator. Go to Administration > Access > Credential Vault and create a credential vault slot to allow you to access the syndicator.

Click on Add a vault slot and create a slot. Be sure to use an Administrator id as a userid.

Verify Java Heap Size for WebSphere Portal Server


If you intend to syndicate a library that contains more than 10000 items, update the maximum Java heap size used by the portal application server on the subscriber machine to at least 1024 MB. Also ensure that you have at least as much swap space allocated on the subscriber machine as you have physical memory. To verify or update the heap, In the administrative console for IBM WebSphere Application Server, navigate to the Java Virtual Machine settings.

384 of 439

Standalone server: Servers > Server Types > WebSphere application servers > WebSphere_Portal > Java and Process Management > Process definition > Java Virtual Machine Clustered server: System administration > Deployment manager > Java and Process Management > Process Definition > Java Virtual Machine

Update the value in the Maximum Heap Size field. A value of at least 1024 MB is recommended.

Configuring syndication for this example


To set up a syndication relationship, ensure both the subscriber and syndicator are running, Then go to Administration > Portal Content > Subscribers. and Click Subscribe Now.

385 of 439

Enter the syndicator URL in the form of http://HostName:HostPort/WcmContextRoot. For example: http://wcmwikiauth.itso.ibm.com:10039/wps/wcm a name for the syndicator item. This name is used as the name of the syndicator item created on the syndicator server, so enter a name that helps identify the syndication relationship you are creating. Enter a name for the subscriber item. This name is used as the name of the subscriber item created on the subscriber server, so enter a name that helps identify the syndication relationship you are creating. Select the credential vault slot you created previously and Click Next.

Then select the libraries you want to subscribe and also select a the Syndication Type in the drop down Scope menu.

386 of 439

Click Finish. You will see a Confirmation Message similar to that shown below.

To begin syndication, click either Update Subscriber or Rebuild Subscriber button. You can see the Confirmation once you click Refresh.

After this step, access the Portal Administration Console on the Syndicator node and go to Administration > Portal Content > Syndicators and you will see the Syndicator already created based on the data entered in the Subscriber and also the status.

387 of 439

Working with existing Syndicator or Subscriber


Notice the actions that are now visible with the subscriber and syndicator views. The same actions are visible in both views and hence have only been explained once below.

Update (Syndicator/Subscriber)
Manual action to override the syndication interval and initiate syndication directly. This action is useful when automatic syndication is disabled. Click on the first icon to trigger this action. The Update to Subscriber. action will push the new updates

Rebuild (Syndicator/Subscriber)
Manual action to overrides the syndication interval and trigger the syndicator to send all action is used when the datastore on updates to the subscriber. Generally, the rebuild the subscriber is lost or corrupted. This action is useful when automatic syndication is disabled. You click on the second icon to trigger a rebuild action.

5.2.3. Monitoring syndication progress


After the syndication relationship was setup, we monitor the progress of the data replication between Syndicators and Subscribers for details such as whether the syndication was successful, when it occurred, and how many changes were included.

Monitor Syndicator/Subscriber views


We started monitoring the syndication process by observing the Syndicator and Subscriber views. The screenshots below illustrates the new status visible in the Syndicator and Subscriber views. The following figure shows the Web content Subscribers view with the WcmWikiSubscriber's status being idle.

388 of 439

The following figure shows the Web Content Syndicators view with the WcmWikiAuthSyndicator's status being idle.

The table below provides details about the different states and provides a brief description. Status Idle Pending Queued Description The syndication process is idle. The syndicator has received a request, but it has yet to initiate it. The syndicator has sent a request to the syndication application, but syndication is not yet active. This state will not occur if the subscriber has initiated syndication. The status remains as Idle until syndication begins and the status then changes to Active. The syndication process is active. The syndication process is disabled. If syndication was already in process prior to being disabled, the status can be a combination of Disabled and Pending, Queued, or Active.

Active Disabled

Once the syndication process has completed, the Syndicator and Subscriber views display the idle status as illustrated in the screenshots above.

Monitor the Synicator/Subscriber status report


We use the Last Update column entry links on the syndicator and subscriber to review the Syndicator and Subscriber status reports as illustrated in the screenshots provided below.

389 of 439

390 of 439

The following table describes the information available in the Syndicator and Subscriber status reports. Field Name Syndicator and subscriber ID, name, and URL Enabled Type Description This information provides identifying details about the syndicator and subscriber that are engaged in syndication.

This field indicates whether syndication is enabled for the syndicator or subscriber. This field indicates whether partial or full syndication occurred. With partial syndication, only those items that have been updated since the last syndication are replicated. Full syndication replicates all items, regardless of whether they have been updated since the last syndication. These fields provide the date and time when syndication started and finished. This field indicates whether syndication was successful. This field provides detailed information about the syndication result, including any errors that occurred during syndication.

Started and finished time stamps Result Detail

391 of 439

Updates sent

This field indicates the number of items that have been updated. This includes new items that have been added and existing items that have been updated. This field indicates the number of items that have been removed. This field displays state information for a syndicator or subscriber before and after syndication occurred. This information is provided for the opposite member of the syndication relationship, so for example if you are viewing syndication results for a syndicator, the old and new states for the subscriber are displayed. If successful, this field indicates the actual change of status. If syndication has failed, this indicates what should have been the change of status. Note: The syndication state only displays a list of item gatherer ids and the current state. It is designed to be used as a diagnostic tool when troubleshooting syndication. This lists: the number of updates sent the number of successful updates the number of failed updated

Removes sent Old state and new state for subscriber or syndicator

Update summary

Note: The number of updates listed here does not directly relate to the number of items updated. For example, if you create a library and then create a taxonomy item in the library, you have updated a single item. However in the Update summary this will be displayed as three updates; one for the library, one for the new taxonomy and one for its version. Update details This section provides additional information to the Update summary section. It lists: the number of items that didn't require an update because they have already been updated the number of new items created the number of items updated the number of failed updates the number of items that didn't require removal because they have already been removed the number of failed removals the number of items removed

Pending items view


After you set up a syndication relationship, you can monitor pending items on a syndicator. Pending items are items that have been updated on the syndicator since the last syndication occurred. Access the WebSphere Portal Administration page in the Syndicator and navigate to Administration>Portal Content>Syndicators and click for a syndicator. The screenshot below shows the pending items view.

392 of 439

Monitor the Subscriber directory


Once Syndication has started, you can monitor its progress by looking at the \PortalServer\wcm\ilwwcm\system\subscriber\ directory on the Subscriber server. As items are being retrieved from the Syndicator, this directory will grow. After all items are retrieved, they will start to be saved within the Subscribers repository. As each item is saved in the repository, its corresponding file entry will be removed from the above directory. The figure below shows the Subscribers file system directory during syndication.

393 of 439

The figure below shows the Subscribers file system directory after syndication.

Files can remain in the subscriber directory for any of the following reasons: A failed attempt to save to the database due to a software error Syndication is interrupted or killed before it completes writing to the database WCM is not handling the syndication changes properly

Monitor the logs


Once the syndication process is completed, we notice the following entries in the SystemOut.log for the Syndicator and the Subscriber. Syndicator logs [9/10/11 21:20:58:953 PDT] 0000004f SyndicatorTas I Subscription: [IceId: <5b13c813cd97-42d5-b9ab-4e35079ca9fe> Current State: <87f6bc08-3cc8-459a-866a3874dd2c9d3e:1315337007437,1252960041b11551a9faedf39c984080:1315670080703 >] updated successfully. Subscriber logs [9/11/11 0:21:01:359 EDT] 0000002d SubscriberTas I Finished processing update for subscription: [IceId: <5b13c813-cd97-42d5-b9ab-4e35079ca9fe> Current State: <87f6bc08-3cc8-459a-866a3874dd2c9d3e:1315337007437,1252960041b11551a9faedf39c984080:1315670080703 >]

5.2.4. Key considerations for syndication


The following lists the items which need to be taken into account when configuring and working with syndication in IBM Web Content Manager (WCM): Syndication requires that both the Syndicator WCM instance and the Subscriber WCM instance are at the same IBM Web Content Manager version. Syndication is not supported between versions. For example, Syndicating Server A with version 6.1.5 to Server B with version 7.0.0.0 installed is not supported. and vice versa. Syndication interval can only be set globally at the server level and not with each syndicator-subscriber relationship. Similarly automatic syndication can only be disabled globally at the server level.

394 of 439

You cannot syndicate to a pre-existing library (on the Subscriber) with the same name as the Syndicator library. Even though the two libraries might have the same name, they have different unique ID's. Search Collections are not syndicated which means they have to be created on both servers. JSP files used by WCM JSP components aren't syndicated, so you need to ensure that they manually copied to any Subscriber servers. It is expected that the Syndicator and the Subscriber should share the same user repository if they use automatic syndication. If this is not the case, disable automatic syndication and perform manual syndication. The latter should be followed by executing the MemberFixer module. Library access control settings are not part of syndication, and hence you must manually set access permissions on the subscriber's library when syndicating for the first time.

5.3. Web content maintenance

5.3.1. Member fixer task


Users and groups are referenced in IBM Web Content Manager items to ensure that only authorized users can access the items. It is common for user names or group names to change over time. Example 1: A user name can change due to a change in their marital status. Example 2: A user can move from one department to another within the organization say from HR to Finance which would change the fully qualified distinguished name from CN=<firstname lastname>,OU=HR,O=<companyname> to CN=<firstname lastname>,OU=Finance,O=<companyname> In such cases, it is necessary to change the user or group references made in an item refer to the new user or group. Administrators can also use the member fixer task to check whether any users or groups referenced in the IBM Web Content Manager items have been renamed or deleted and fix these references. The member fixer task checks all of the items in a specified library for references to users and groups that no longer exist in the current user repository. When run in report mode, it will report all the references to members. When run in fix mode, these references can be fixed, either by replacing them with references to members that exist, or by removing the references. References to members in library items contain the distinguished name of the member as well as a unique ID for the member. This unique ID is an internal id that is unique over time, and is different to the distinguished name. This means if a member is deleted and another member is created with the same distinguished name, the two members will have different unique IDs. The mismatchedId parameter can be used to update or remove references from web content items to users with these unique IDs.

395 of 439

When a member that has been given permissions on a library is deleted, the member permissions are removed from the library, so that any inherited permissions for items in the library will also be removed. Therefore, the member fixer task cannot be used to update these permissions to a different member. However, when an LDAP transfer is carried out, the member permissions on the library are maintained. So, the member fixer task can be run after an LDAP transfer to update or remove these permissions.

Enable the member fixer task


Enabling the member fixer task can be done from the IBM WebSphere Application Server administration console:
1.

As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following: Resources > Resource Environment > Resource Environment Providers > WCM WCMConfigService.

2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as shown in the screenshot below.

396 of 439

3. Set or update the following properties on the server where you will run the member fixer tool: - connect.businesslogic.module.memberfixer.class = com.aptrix.pluto.security.MemberFixerModule - connect.businesslogic.module.memberfixer.remoteaccess = true - connect.businesslogic.module.memberfixer.autoload = false

4. Save the changes and restart the server for these settings to take effect.

Custom mapping
To update a reference to a member that does not exist with a member that does exist, member mappings can be defined in a custom mapping file. Where the member fixer task does not find a mapping in this file for a member, it will search the user repository for members with the same ID as the member that no longer exists. If such a member is found, it will update the reference with this user or group, or remove the reference, as specified by the -DaltDn parameter described below. If no such member is found, this

397 of 439

member is classified as 'invalid' and will be updated or removed as specified by the DinvalidDn parameter described below. Use these steps to define member mappings in a custom mapping file:
1.

Edit the following file: <wp_profile_root>/PortalServer/wcm/shared/app/config/wcmservices/MemberFixerModul e.properties.

2. As shown in the screenshot, the examples available in the file demonstrate how you can either configure a full replacement of one distinguished name with another or you can configure part replacement of a distinguished names which will change all of the distinguished name except the common name. 3. Once you have defined the member mappings, you can save the file and then run the member fixer task using the -DaltDn option as described below.

Member fixer task settings


Use the following parameters to run the member fixer task: Member fixer task command parameters DPortalAdminId=<user name> DPortalAdminPwd=<pa Description Use these parameter in the command to identify the Portal administrator username and password. An administrator user name and password is not required if you have already specified the portal administrator username and password using the

398 of 439

ssword> -Dlibrary="<library name>"

PortalAdminId and PortalAdminPwd settings in the wkplc.properties file. Use this parameter in the command to identify the web content library. If this parameter is omitted, the default library that has been configured with the defaultLibrary property in the WCM WCMConfigService service is used. Use this parameter in the command when non-existent users or groups have alternate distinguished names (DNs) available and you want to update the items that reference the non-existent users or groups. Use this parameter in the command when non-existent users or groups have alternate distinguished names (DNs) available and you want to remove the members that reference the users or groups. If users or groups have invalid distinguished names (DNs) the report will list these as "invalid". This means the distinguished name doesn't exist and there is no alternate distinguished name available. Use this parameter in the command to update users and groups that have invalid distinguished names with the portal administrator user's distinguished names. Use this parameter in the command to remove users and groups that have invalid distinguished names. Use this parameter in the command when users or groups have been found with mismatched unique IDs and you want to fix these users and groups with mismatched unique IDs. Use this parameter in the command when users or groups have been found with mismatched unique IDs and you want to remove these users and groups with mismatched unique IDs. Use this parameter in the command to preserve the last modified date of items updated by the member fixer task. Otherwise the last modified date will be updated when the member fixer task is run. Use this parameter in the command to restrict which item types are processed. The member fixer tool can be run against the following item types: content folder project style (for presentation templates) template (for authoring templates) taxonomy category SiteArea Workflow WorkflowStage

-DaltDn=update

-DaltDN=remove

-DinvalidDn=update

-DinvalidDn=remove DmismatchedId=updat e DmismatchedId=remov e -DpreserveDates=true

DrestrictOn=<ItemType >

399 of 439

WorkflowAction Cmpnt (for components)

If this parameter is not used, the member fixer module will run against all the item types. You can specify more than one item type by separating values with a comma. Example: -DrestrictOn=content,folder,project DsessionTimeOut=<tim eOut> Use this parameter in the command to prevent your session timing out before the task has finished. This sets the number of seconds in which the task must complete before its session will timeout. The default session timeout is 14440 seconds, which is 4 hours. For large repositories you should increase this setting. Example: -DsessionTimeOut=36000, which is 10 hours. In a federated security environment with multiple realms, use this parameter in the command to specify the realm to run the member fixer task on. If this parameter is omitted the default realm will be used. The member fixer task will check whether there are any members and groups referenced in items that are under any of the base distinguished names defined for the specified realm and fix these references. References to members can only be updated with references to members in the specified realm. In a federated security environment with multiple realms, the member fixer task should be run for each realm in turn to make sure that all of the references are fixed. The member fixer task can be used to check whether there are any members and groups referenced in items that are not under any of the base distinguished names defined for any of the realms in the environment and fix these references. To do this, follow the same steps described above for a single realm environment and add -DnoRealmDn=true to the command. Use this parameter in the command to run the member fixer task in fix mode. If this parameter is omitted the member fixer task will run in report mode only.

-Drealm=<realmName>

-DnoRealmDn=true

-Dfix=true

Running the member fixer task


Use the following steps (Windows platform) to run the member fixer task: 1. Open a command prompt and change directory to the following path: <wp_profile_root>/ConfigEngine 2. To run the member fixer task run the following command along with the parameter described above: ConfigEngine.bat run-wcm-admin-task-member-fixer

400 of 439

For example: To run the member fixer task in report mode against your library run the following command: ConfigEngine.bat run-wcm-admin-task-member-fixer -DPortalAdminId=<username> DPortalAdminPwd=<password> -Dlibrary="<library name>" 3. Before progressing to the next step and running the member fixer task in fix mode, ensure that the report mode indicates that the updates will happen as you require. A summary of the updates will be shown by the command. A detailed report containing the updates that will be made for each item will be shown in the SystemOut.log file located in <wp_profile_root>\logs\WebSphere_Portal. If the report indicates that the update will not happen as required, change the member fixer task parameters and run the report mode again. Repeat this process until you are satisfied that the fixes will be applied correctly. This is important because the fixes made by the member fixer task when run in fix mode may not be easy to undo if incorrect fixes are applied. Use the parameters available to run the member fixer task as per your requirement.

Example
In the example below we have captured some screenshots of running the member fixer task in report mode against the Sample library which we had imported into our WCM server. 1. We modified the <wp_profile_root>/PortalServer/wcm/shared/app/config/wcmservices/MemberFixerM odule.properties file and added the following value to it: uid=xyzadmin,o=defaultWIMFileBasedRealm -> uid=portaladmin,o=defaultWIMFileBasedRealm 2. Ensuring the WebSphere Portal server was running, we then ran the following command from <wp_profile_root>/ConfigEngine: ConfigEngine.bat run-wcm-admin-task-member-fixer -DPortalAdminId=portaladmin DPortalAdminPwd= -Dlibrary="Sample" The screenshot displays a snippet of the command prompt messages:

401 of 439

3.

Once the process was completed, we checked the SystemOut.log and a snippet of log file is included below for reference.

5.3.2. Update security task


Administrators can use the update security task to apply inherited access permissions and remove existing item access permissions for specify item types or all items. This task is useful as a post-migration step, or if you are applying major changes to your inheritance settings.

402 of 439

Update security task settings


Use the following parameters to run the update security task: Update security task command parameters DWasPassword=<pass word> DPortalAdminId=<user name> DPortalAdminPwd=<pa ssword> -Dlibrary="<library name>" Description Use this parameter in the command to identify the WebSphere Application server administrator password. Use these parameter in the command to identify the Portal administrator username and password. An administrator user name and password is not required if you have already specified the portal administrator username and password using the PortalAdminId and PortalAdminPwd settings in the wkplc.properties file. Use this parameter in the command to identify the web content library. If both the parameters -Dlibrary and -DallLibraries are omitted, then the default library that has been configured with the defaultLibrary property in the WCM WCMConfigService service is used. Use this parameter in the command to run the update security task against all the libraries on the server. If both the parameters -Dlibrary and -DallLibraries are omitted, then the default library that has been configured with the defaultLibrary property in the WCM WCMConfigService service is used. Use these two parameters together in the command to apply inherited access permissions to items in a library across all the roles. Use this parameter in the command to remove inherited access permissions on items in a library across all the roles. Use this parameter in the command to remove existing item access permissions for items in a library across all the roles. Use this parameter in the command to preserve the last modified date of items updated by the security update task. Otherwise the last modified date will be updated when the security update task is run. Use this parameter in the command to restrict which item types are processed. The member fixer tool can be run against the following item types: content folder project

-DallLibraries=true

-DinheritPerms=apply DlibSecurity=true DinheritPerms=remove DremoveExistingPerms =true -DpreserveDates=true

DrestrictOn=<ItemType >

403 of 439

style (for presentation templates) template (for authoring templates) taxonomy category SiteArea Workflow WorkflowStage WorkflowAction Cmpnt (for components)

If this parameter is not used, the member fixer module will run against all the item types. You can specify more than one item type by separating values with a comma. Example: -DrestrictOn=content,folder,project DsessionTimeOut=<tim eOut> Use this parameter in the command to prevent your session timing out before the task has finished. This sets the number of seconds in which the task must complete before its session will timeout. The default session timeout is 14,440 seconds, which is 4 hours. For large repositories you should increase this setting. Example: -DsessionTimeOut=36000, which is 10 hours.

Running the update security task


Use the following steps (Windows platform) to run the update security task: 1. Open a command prompt and change directory to the following path: <wp_profile_root>/ConfigEngine 2. To run the update security task run the following command along with the parameter described above: ConfigEngine.bat run-wcm-admin-task-update-security

5.3.3. Workflow update tool


Administrators can use the workflow update tool to add a workflow to existing items that are not already workflow enabled.

Enable the workflow update tool


Enabling the workflow update tool can be done from the IBM WebSphere Application Server administration console: 1. As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following: Resources > Resource Environment > Resource Environment Providers > WCM WCMConfigService.

404 of 439

2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as shown in the screenshot below.

3. Set or update the following properties on the server where you will run the member fixer tool: connect.businesslogic.module.workflowenablement.class=com.aptrix.pluto.workflow. WorkflowEnablementModule - connect.businesslogic.module.workflowenablement.remoteaccess=true - connect.businesslogic.module.workflowenablement.autoload=false

405 of 439

4. Save the changes and restart the server for these settings to take effect.

Workflow update tool settings


Use the following query string parameters to run the workflow update tool: Workflow update tool query string parameters &library Description Use this query string parameter to specify the web content library you want to run the clear versions tool against. If the library query string parameter is omitted, this tool will run against the default library that has been configured in the WCM WCMConfigService service using the IBM WebSphere Application Server administration console. Use this query string parameter to specify the workflow that will be applied to the items. Use this query string parameter to specify the workflow stage that the updated items will move to. If this parameter is omitted, items will be placed in the first workflow stage of the selected workflow. Use this query string parameter to preserve the last modified date of items updated by the workflow update tool. Use this query string parameter to restrict which item types are processed. The clear versions tool can be run against the following item types: content

&workflow=<workflowname>

&workflowstage=<workflowstagename>

&preserve_dates=true

&restrictOn

406 of 439

folder project style (for presentation templates) template (for authoring templates) taxonomy category SiteArea Workflow WorkflowStage WorkflowAction Cmpnt (for components)

If this parameter is not used, the workflow update tool will run against all the item types. &forceUnlock=true Use this query string parameter to force locked items to be unlocked while running the workflow update tool. Use this query string parameter to prevent your session timing out before the workflow update tool task has finished. This sets the number of seconds in which the task must complete before its session will timeout. The default session timeout is 14440 seconds, which is 4 hours. For large repositories you should increase this setting. Example: &sessionTimeOut=36000, which is 10 hours.

&sessionTimeOut=<timeOut>

Running the Workflow update tool


Use the following steps to run the workflow update tool: 1. Log in to the portal as an administrator. 2. Enter the following URL in the same browser instance and specify parameters as per your requirement: http:// [HOST]: [PORT]/wps/wcm/myconnect/?MOD=workflowenablement&library=libraryname&work flow=workflowname

407 of 439

5.3.4. Clear history tool


Administrators can use the clear history tool to clear the history of an item. Note: You cannot completely clear item history. One history item will always remain in an item no matter what parameters you select when clearing the item history.

Enable the clear history tool


Enabling the clear history tool can be done from the IBM WebSphere Application Server administration console:
1. As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following: Resources > Resource Environment > Resource Environment Providers > WCM WCMConfigService.

2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as shown in the screenshot below.

408 of 439

3. Set or update the following properties on the server where you will run the clear history tool: - connect.businesslogic.module.clearhistory.class=com.aptrix.history.ClearHistoryModule - connect.businesslogic.module.clearhistory.remoteaccess=true - connect.businesslogic.module.clearhistory.autoload=false

Save the changes and restart the server for these settings to take effect.

Clear history tool settings


Use the following query string parameters to run the clear history tool: Clear history tool query string parameters &day=<date>&month=<month>&year=<year> Description Use this query string parameter to specify the date. The clear history tool will use this date to clear the

409 of 439

history entries prior to this date. If no date is specified, then the date will default to one year before the current date. &keep Use this query string parameter to specify the minimum number of history entries to keep. If a number is not specified, then the minimum number of history entries to keep will default to 10. Example: If an item has not been updated for over a year, and you specify to clear all history entries more than a year old, but choose to keep the last five history entries, all the history entries will be cleared except for the last five history entries even though they are over a year old. Use this query string parameter to restrict which item types are processed. The clear history tool can be run against the following item types: content style (for presentation templates) template (for authoring templates) taxonomy category SiteArea Workflow WorkflowStage WorkflowAction Cmpnt (for components)

&restrictOn

If this parameter is not used, the clear history tool will run against all the item types. &library Use this query string parameter to specify the web content library you want to run the clear history tool against. If the library query string parameter is omitted, this tool will run against the default library that has been configured in the WCM WCMConfigService service using the IBM WebSphere Application Server administration console.

410 of 439

&fix

Use this query string parameter to run the clear history tool in report mode or fix mode. If this query string parameter is omitted or set to false, a report listing of which history entries will be cleared is displayed. If set to true, history entries will be cleared as specified.

Running the clear history tool


Use the following steps to run the clear history tool: 1. Log in to the portal as an administrator. 2. Enter the following URL in the same browser instance and specify details of what history details to clear: http:// [HOST]: [PORT]/wps/wcm/myconnect?MOD=ClearHistory&day=date&month=month&year=ye ar&keep=number_of_entries&restrictOn=item_type&library=library_name&fix=true

5.3.5. Clear versions tool


Administrators can use the clear versions tool to clear the version history of an item. Note: You cannot completely clear all versions. One version of an item will always remain no matter what parameters you select when clearing the version history.

Enable the clear versions tool


Enabling the clear versions tool can be done from the IBM WebSphere Application Server administration console: 1. As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following: Resources > Resource Environment > Resource Environment Providers > WCM WCMConfigService.

411 of 439

2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as shown in the screenshot below.

3.

Set or update the following properties on the server where you will run the clear version tool: connect.businesslogic.module.clearversions.class=com.aptrix.versioncontrol.ClearVe rsionsModule - connect.businesslogic.module.clearversions.remoteaccess=true - connect.businesslogic.module.clearversions.autoload=false

412 of 439

4. Save the changes and restart the server for these settings to take effect.

Clear versions tool settings


Use the following query string parameters to run the clear versions tool: Clear versions tool query string parameters &day=<date>&month=<month>&year=<year> Description Use this query string parameter to specify the date. The clear version tool will use this date to clear version history prior to this date. If no date is specified, then the date will default to one year before the current date. Use this query string parameter to specify the minimum number of history versions to keep. If a number is not specified, then the minimum number of versions to keep will default to 10. Example: If a version has not been created for over a year, and you specify to clear all versions more than a year old, but choose to keep the last five versions, all versions will be cleared except for the last five versions even though they are over a year old. Use this query string parameter to restrict which item types are processed. The clear versions tool can be run against the following item types:

&keep

&restrictOn

413 of 439

content style (for presentation templates) template (for authoring templates) taxonomy category SiteArea Workflow WorkflowStage WorkflowAction Cmpnt (for components)

If this parameter is not used, the clear versions tool will run against all the item types. &library Use this query string parameter to specify the web content library you want to run the clear versions tool against. If the library query string parameter is omitted, this tool will run against the default library that has been configured in the WCM WCMConfigService service using the IBM WebSphere Application Server administration console. Use this query string parameter to run the clear versions tool in report mode or fix mode. If this query string parameter is omitted or set to false, a report listing of which versions will be cleared is displayed. If set to true, versions will be cleared as specified.

&fix

Running the clear versions tool


Use the following steps to run the clear versions tool: 1. Log in to the portal as an administrator. 2. Enter the following URL in the same browser instance and specify details of what history details to clear: http:// [HOST]: [PORT]/wps/wcm/myconnect?MOD=ClearVersions&day=date&month=month&year=year &keep=number_of_entries&restrictOn=item_type&library=library_name&fix=true

414 of 439

5.4. Web content feed management


Administrators can configure new Web Content Integrator (WCI) feeds to consume content from external, third party sources into IBM Web Content Manager. These feeds can also be configured to run on schedule. This section covers the various web content feed management tasks in detail. Note: Only administrators can perform web content feed management tasks described in this section.

Web Content Integrator Feeds


As an administrator, you can maintain web content feeds from the IBM WebSpere Portal Administration portlet as shown in the screen below.

Actions to manage web content feeds


There are several actions available for the administrator to manage the web content feeds.

Create a new web content feed configuration


Use the following action button to create a new web content feed configuration.

Consume an existing web content feed


Use the following action button to manually consume an existing selected web content feed configuration.

415 of 439

Delete an existing web content feed


Use the following action button to delete an existing selected web content feed configuration.

Creating a feed configuration


As an administrator, follow these steps to create a new feed configuration: 1. Access the WebSphere Portal administration page and navigate to Portal Content > Feed Configurations.
2.

Use the New action to create a new feed configuration and enter a suitable name for this feed configuration.

3. Enter the WCI feed URL. Note that spaces in the URL should be replaced with a + sign and non-ascii characters should be encoded. 4. Select a credential slot for the feed. This will need to be created prior to creating the feed configuration. 5. Select the web content library this feed configuration will save the content. 6. Select a credential slot for the web content library. This will need to be created prior to creating the feed configuration. 7. Select the preferred method to pass the handshake data either in the feed or in the HTTP headers. In the Feed The feed producer puts the information in the feed and the consumer returns the values via the query string. Each time the consumer makes a request for the feed URL, the following query string is appended: ?etag={etag_value}&lastMod={last-modified_value} Feeds sent back from the producer contain the following channel-level elements:

416 of 439

<lastBuildDate>{last-modified_value}</lastBuildDate> <ibmfs:etag>{etag_value}</ibmfs:etag> In the HTTP Headers The handshake data is exchanged using standard HTTP protocol header fields. This is the default and preferred method. Requests from the Consumer contain: If-Modified-Since : {last-modified_value} If-None-Match: {etag_value} Responses from the producer contain: ETag: {etag_value} Last-Modified: {last-modified_value} 8. Select whether to check the publication date or not. If selected, web content items that have the same publish date as the feed source will not be processed. 9. If you want to use an XSLT style sheet, select Enable XSLT and specify the path to the XSL file relative to the /config/xslt directory in the feed Service application. 10. Use either the Save action to save the configuration without consuming the

to do save and consume feed, or Save and Consume action the feed. 11. Look at the SystemOut.log file to see messages from the Consume task. A snippet of the SystemOut.log file is included in the screenshot below.

Web Content Integrator Jobs


As an administrator, you maintain web content feed jobs from the WebSpere Portal Administration portlet as shown in the screen below. Use a feed job to manage a group of feed configurations and apply a schedule to them.

417 of 439

Actions to manage web content feed jobs


Several actions are available for the administrator to manage the web content feed jobs.

Create a new feed job


Use this action to create a new feed job.

Start a feed job


Use this action to immediately start a selected feed job regardless of when it is scheduled to run next.

Stop a feed job


Use this action to stop a selected feed job. This will also reset any feed jobs that may have stopped running correctly.

Suspend job schedules


Use this action to suspend a selected job schedule.

418 of 439

Resume job schedules


Use this action to resume a selected job schedule.

Delete a feed job


Use this action to delete a selected feed job.

Creating a feed job


As an administrator, follow these steps to create a new feed job: 1. Access the WebSphere Portal administration page and navigate to Portal Content > Feed Jobs.
2.

Use the New action this feed job.

to create a new feed job and enter a suitable name for

3. Define how often (minutes, hours or days) you want to run this job by entering and selecting the values in the Run Every field. 4. Select the feed configuration that you have configured from the list.. You can use the Remove action to remove an existing feed configuration selection. 5. Use the Save action to save the configuration.

419 of 439

5.5. Caching
Caching in IBM Web Content Manager (WCM) can be performed at three different levels: Web server: using a caching proxy module part of Websphere Edge components Application Server: using WebSphere Servlet Caching to store the responses generated by the WCM servlet or portlets for future users WCM: Elements can be cached in WCM reducing the number of database calls.

This section focuses on IBM WCM caching.

IBM Web Content Manager generated web pages and content from external data sources can be cached by the Web Content Manager application If utilized correctly, Web Content Manager caching can dramatically increase the performance of a site. More details about caching are available in the IBM Web Content Manager product infocenter and in the wiki article Web Content Management Caching and Pre-rendering Reference URL : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Caching_options_wcm7 and http://www-10.lotus.com/ldd/portalwiki.nsf/dx/web-content-management-caching-and-prerendering

IBM Web Content Manager cache types


IBM Web Content Manager has two types of caching, basic and advanced Caching. Advanced caching can cache pages based on different user profiles and Cache parameters in connect tags. URL requests can also be used to override your server's default advanced web content caching settings allowing you to set custom cache settings for individual web pages or components.

Basic web content caching


This is the simplest caching option. The first time a web page is rendered by the Web Content Manager application, it is stored in a cache. Users then access this page from the cache until it expires. Only then is the web page rendered afresh. The main benefit of this scenario is improved performance. Basic caching should only be used on static content that does not require "real-time" access.

Advanced web content caching


Advanced caching option provides a variety of cache settings options like Site, Session, User, Secured and Personalized caching option to address the different requirements.

420 of 439

1. Site - This is the same as the basic web content cache except that cache parameters in connect tags and URL requests can be used to override your server's default advanced web content caching settings. 2. Session - When session caching is enabled, a copy of each Web page a user visits is stored in the session cache. The User accesses the cached version of a web page until they start a new session, or until the cached web page is expired from the cache 3. User - When user caching is enabled, a copy of each Web page a user visits is stored in the user cache. The user accesses the cached version of a web page until the cached web page is expired from the cache 4. Secured - Secured caching is used on sites where the item security features are used to grant different users access to different Web pages and components based on the groups they belong to. 5. Personalize - Personalized caching is used to cache web pages of users who have the same "personalization profile". This means that users who have selected the same personalization categories and keywords, and who belong to the same group, share a single cache.

Configuring IBM Web Content Manager caching


You define and manage web content cache options in the WCM WCMConfigService service using the IBM WebSphere Application Server administration console. To set these, access the WebSphere Application Server administration console and navigate to Resource environment providers, WCM WCMConfigService. The configuration options are specified under Custom properties section and can be updated to the desired settings.

Alternately you can uncomment and update the desired property in the WCMConfigService.properties file in \PortalServer\wcm\shared\app\config\wcmservices directory and then run the config task update-wcm-service-properties. Refer to the IBM Web Content Manager Infocenter for more details. URL : www.lotus.com/ldd/portalwiki.nsf/dx/Setting_service_configuration_properties_exp7

421 of 439

1: 2: # Advance caching 3: connect.moduleconfig.ajpe.contentcache.defaultcontentcache=Secured 4: connect.moduleconfig.ajpe.contentcache.contentcacheexpires=REL 600s 5: # Basic cache 6: #connect.businesslogic.defaultcacheexpires=REL 3D 7: #connect.businesslogic.defaultcache=false Note: You will need to restart WebSphere Portal to enable any configuration changes made. When making changes to clustered servers, you will need to ensure the WCM WCMConfigService service section under the Cluster Scope is updated.

Monitor WCM caching


IBM Web Content Manager caching settings can be tuned and monitor using WebSphere Application Server extended cache monitor. The caches you will need to focus in the Cache Monitor are as follows. CACHE Type Servlet Caching WCM Basic Cache WCM Advanced Cache WCM Session Cache Cache Instance to Monitor BaseCache services/cache/iwk/module services/cache/iwk/processing

services/cache/iwk/session

You can get the Cache Statistics or review the cache content, invalidate a cache, etc using the WebSphere Application Server extended cache monitor.

422 of 439

Refer to WebSphere Application Server Infocenter for more details on monitoring and managing cache. The below screenshot provide on example on what is seen in the in the cache monitor application when you select the Cache Content option. This enables you to invalidate a specific cache or you you clear all caching the Cache Statistics panel.

5.6. Deployment
This section covers a high level overview of the authoring environment and the various options available for delivery of IBM Web Content Manager (WCM) content.

Authoring environments
The WCM authoring environment is usually the environment in which the content authors and editors will create and update content and approvers will approve the content before it is published. There are various WCM authoring topologies that are possible. Refer to the following wiki article that describes these authoring topologies: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/5.2.2-authoring-environments Note: Even though the link refers to the wiki topic from the previous version of WCM, the authoring topologies described still apply to WCM v7.

Rendering environments
WCM sites can be delivered using one of the following three mechanisms: Porlet rendering (local and remote) Servlet rendering Pre-rendering

423 of 439

5.6.1. Portlet rendering


WebSphere Portal sites can include WCM content using the portlet rendering option. With this option, the JSR 286 web content viewer portlet is added to the WebSphere Portal page where the WCM content is required. This JSR 286 web content viewer portlet can be configured for displaying the WCM content from a web content library. Multiple JSR 286 web content viewer portlets can be included on a WebSphere Portal page if required. The portlet rendering can be implemented using the following: Perform local rendering using the JSR 286 web content viewer portlet Perform remote rendering using the Web Services for Remote Portlets (WSRP) and the JSR 286 web content viewer portlet

JSR 286 web content viewer portlet


Use the JSR 286 web content viewer portlet to display WCM content where the portal page displays the WCM content that resides locally on the same server. To add a web content viewer portlet on a portal page, follow these steps: 1. As an administrator, navigate to Administration - Manage Pages and then click on the Edit Page Layout action as shown in the screenshot below.

2.

Click on Add portlets action 286). Select the portlet and click OK.

and search for Web Content Viewer (JSR

424 of 439

3.

The web content viewer is now added to the portal page. The screenshot below displays multiple web content viewer portlets on the portal page.

4.

Click on the Edit shared settings action to configure the web content you want this web content viewer to display.

425 of 439

5. A new window will pop up as shown in the screenshot below. The Content section enables you to select the content from a web content library to display in the portlet. The Profile section contains profiling settings for the JSR 286 web content viewer where you can specifying categories, site areas, and authoring templates that can be used as menu search options. The Portlet Settings section defines additional settings for the JSR 286 web content viewer where you can set the portlet and page display title and configure the portlet cache options. The Advanced Options section allows you to define the broadcast behavior between web content viewers, specify if context processors plug-ins are applied and set the scope of the tag cloud results.

426 of 439

Refer to the following wiki link to understand each of these sections in detail: http://www10.lotus.com/ldd/portalwiki.nsf/dx/Editing_the_settings_of_a_web_content_viewer_por tlet_wcm7

427 of 439

6. Clicking OK to display a preview of the content you selected for the web content viewer portlet.

Web Services for Remote Portlets (WSRP)


Use this option to display WCM content where the portal page displays the WCM content that resides on an external WCM server. This option makes use of the JSR 286 web content viewer and the portal's Web Service for Remote Portlets (WSRP) support. The remote web content server acts as the WSRP Producer and the portal with the web content viewer acts as the WSRP Consumer. Refer to the following article: Setting up the rendering Web Content Viewer portlet consumed from remote IBM Web Content Manager V7 using WSRP http://www10.lotus.com/ldd/portalwiki.nsf/dx/Rendering_Web_Content_Viewer_portlet_consumed_fr om_Remote_IBM_Web_Content_Manager_V7_using_WSRP.__Setup_and_troubleshoot ing_guide.#

Local rendering option versus Remote rendering option


The following information help you decide which rendering option to select for your environment. Remote rendering option Use this option if you expect low volume of requests This option requires fewer WCM software licenses Primary Consideration Volume of requests for WCM content Cost Local rendering option Use this option if you expect a high volume of requests This option requires WCM software licenses for every instance of a WCM server Local rendering option No

Remote rendering option Yes (if redirection is setup and fully qualify URLs is disabled) Low

Secondary Consideration WCM server can be placed behind a firewall WCM related CPU activity on the delivery server Complexity of administration Network traffic CPU requirement Dynamic linking using Web Content Pages Tagging and rating

High

More servers to administer Longer network path Less CPU requirement Is not possible Is not available

Less servers to administer Less network activity High CPU requirement Is possible using JSR 286 portlet Is available using JSR

428 of 439

286 portlet Yes Upgrade WCM independent of WebSphere Portal No

Web content viewer best practices


The following URL describes the best practices for the web content viewer portlet: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Web_content_viewer_best_practices_wcm7

Web content pages


A web content page is a portal page that displays web content from a site or site area by mapping

the page to the web content site structure in your Web Content Manager system. When you add the web content viewer to a web content page, the portlet automatically renders the default content of the attached site or site area. In addition to displaying the default content, the web content viewer provides a dynamic broadcasting option that selects the best matching web content page when selecting links to other content items. For additional details on web content pages refer to the following wiki link: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Working_with_web_content_pages_wcm7

5.6.2. Servlet rendering


IBM Web Content Manager (WCM) website can be delivered dynamically using the WCM servlet by accessing a URL. This option can be used when the website does not require any WebSphere Portal functionality (i.e. aggregation of content and applications depending on a the end user role). The WCM servlet URL has the following format: http:// [HOST]: [PORT]/wps/wcm/connect/ [PATH]?srv=[cmpnt or page] where: HOST is the server host name. PORT is the port number for the WebSphere Portal server. PATH can be the path to a site area or content item. This must be entered for all types of content including components. In the case of components, this is the path to the site area or content item that the component is displayed with. srv=[cmpnt or page] is either a component or a page you wish to display.

Note: As non-ascii characters can not be used in the query string section of URLs it is important that you do not use such characters in the names field of WCM items. Refer to the following URL for example URLs of Servlet rendering: http://www10.lotus.com/ldd/portalwiki.nsf/dx/Accessing_web_content_via_a_servlet_wcm7

429 of 439

5.6.3. Pre-rendering
The pre-rendering process takes a copy of the entire IBM Web Content Manager (WCM) website and saves the site as static HTML files and resource files (images, CSS etc.). These static pre-rendered files can be delivered by the WCM server or by the HTTP web server. This improves the website delivery performance as the pages are not dynamically rendered on the fly. This section discusses how to configure WCM for pre-rendering.

Important considerations
Carefully read through the following important considerations before you use prerendering as an option: Pre-rendering is ideal when the WCM website content does not change very frequently. A personalized website cannot be pre-rendered. The pre-rendering process is configured to run as a user (connect.moduleconfig.cacher.rendereruser) and hence the website snapshot is taken as per the access privileges available to the selected user. It can take a long time to pre-render a large site. While the site is being pre-rendered WCM authoring portlet users may be locked out of the system until the pre-rendering process is completed. So it is recommended that a dedicated pre-rendering server be responsible for pre-rendering. The entire site must be pre-rendered before it can be used, otherwise there will be broken links. Website using page navigation components and WCM Search components cannot be pre-rendered. The path to the content item cannot exceed the operating systems maximum path length which is 255 characters on Microsoft Windows and 1024 characters on Linux. Invalid Characters in Site, Site Area or Content Names: Sites, Site Areas, and Content objects cannot contain characters that are considered invalid in file names by the operating system where the server will pre-render.

Configuring pre-rendering
Pre-rendering configuration can be done from the IBM WebSphere Application Server administration console:
1.

As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following: Resources > Resource Environment > Resource Environment Providers > WCM WCMConfigService.

430 of 439

2.

From the WCM WCMConfigServices page that is loaded, click on Custom properties as shown in the screenshot below.

Note: Refer to the following wiki links to get details on the additional properties that you need to configure for pre-rendering and to learn more about how to pre-render a WCM website respectively: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Configuring_prerendering_wcm7 http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Prerendering_a_website_wcm7

431 of 439

Configure pre-rendering for sites viewed using Web Content Manager


You can configure pre-rendering such that WCM will serve the pre-rendered website content. This option was more important in the Connect Tag days as Connect Tags wouldnt be pre-rendered and thus would be dynamically processed each time a page was requested. As the Connect Tag use is now discouraged, this form of accessing Pre-Rendered content is not popular. To set this option, use the WebSphere administration console to set the following property in the WCM WCMConfigService service: Property name: connect.businesslogic.module.default.class Value: com.aptrix.cacher.CacherModule

Save the setting and restart the server for this setting to take effect. Note: You cannot use the local rendering portlet (Web Content Viewer) when prerendering is set as the default module.

Configure pre-rendering for sites viewed using HTTP server


You can configure pre-rendering such that the pre-rendered website content will need to be served by an external HTTP web server. To set this option, use the WebSphere administration console to set the following property in the WCM WCMConfigService service: Property name: connect.businesslogic.module.cacher.class Value: com.aptrix.cacher.CacherModule

Save the setting and restart the server for this setting to take effect.

5.7. Troubleshooting
IBM Web Content Manager (WCM) writes information, warning and error message to logs during configuration and at real time. These message provides details to resolve problems. The product Infocenter, Troubleshooting section provides details on the logging and information about various log files. URL : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Troubleshooting_wcm7 You can enable logging and tracing for software that is shipped with IBM Web Content

432 of 439

Manager. If you are experiencing a problem, you might want to enable tracing and then recreate the problem to capture more log information.

Enabling tracing
Enabling tracing makes log output more verbose. For example, you can enable tracing within WebSphere Application Server to obtain information about application servers and other processes. Refer to IBM Web Content Manager Infocenter for more details and also to the MustGather data collection lists used in troubleshooting various problems in IBM Web Content Manager. You can enable and disable temporary tracing or setup extended tracing from startup. Refer to WebSphere Portal Family Wiki - Troubleshooting Web Content Manager section for articled that provides more specific details on troubleshooting and resolving various problem with IBM Web Content Manager. (Reference URL : http://www10.lotus.com/ldd/portalwiki.nsf/xpViewCategories.xsp?lookupName=Troubleshooting%20 Web%20Content%20Manager )

Temporary tracing
To enable temporary tracing: 1. Access IBM Web Content Manager as an administrator, then navigate to Administration > WebSphere Portal > Portal Analysis > Enable Tracing. 2. Enter the trace settings for the problem you are trying to troubleshoot and click the icon. Example : com.ibm.workplace.wcm.*=all:com.aptrix.*=all:com.presence.*=all

433 of 439

3. Reproduce the issue and then remove the trace string by selecting the setting you icon. need to remove and click the 4. The trace is written to trace.log file in the application server log directory. Example : C:\IBM\WebSphere\wp_profile\logs\WebSphere_Portal\trace.log.

Extended tracing
Extended/Static tracing is the recommended method of capturing data as it collects data from server startup until problem recreation. You can configure extended tracing as follows: 1. Log into the Integrated Solutions Console as the WebSphere Application Server administrator and navigate to Troubleshooting >Logs and Trace >WebSphere_Portal >Diagnostic Trace. 2. On the Configuration tab, ensure you increase the Maximum File Size and and Maximum Number of Historical Files as needed so that the tracing of the problem recreation is not overwritten due to the amount of traffic on the system and output of the tracing itself. 3. Click Change Log Level Details and enter a trace string. Example : com.ibm.workplace.wcm.*=all:com.aptrix.*=all:com.presence.connect.*=all

434 of 439

followed by:

4. Click OK and save the changes. Restart the WebSphere_Portal application server.

Collecting logs
The location of log files are documented in IBM Web Content Manager Infocenter in section Logging and Tracing. URL : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Logging_and_tracing_wcm7 If any assistance is required you can contact the IBM Product Support and create a PMR and request assistance. Collecting MustGather data early and submitting this when opening a PMR will help get a resolution much quicker. Run the following script from /PortalServer/bin to collect the data: Windows: wpcollector.bat Linux/Unix/i: wpcollector.sh Note: If you want to use wpcollector to FTP the files to IBM Support, include the -Dpmr= parameter to indicate the relevant PMR #. For example: wpcollector.bat -Dpmr=11111,222,333 If you did not FTP your files via wpcollector, locate the "wp.mustgather.zip" file or the "wp.mustgather-timestamp.zip" file in /filesForAutoPD/ and you can send the logs to IBM Support for review and assist. Details on how to Exchanging information with IBM Technical Support for problem determination is documented in link below. http://www.ibm.com/support/docview.wss?rs=688&uid=swg21201571

Tools for troubleshooting and diagnostics


IBM Support makes available a variety of utilities that will help capture specific diagnostic data to help resolve any problems and also aid in taking corrective actions in certain cases. Some of the tools commonly used are WCM Support Tools portlet, Split-second Utility and WebSphere Application Server Extended Cache Monitor utility. More details are included with the download for each tool.

435 of 439

IBM Support tools portlet


IBM Support tools portlet can download from IBM Lotus and WebSphere Portal Business Solutions Catalog website. This can be installed like any standard portlet and added to a portal page with Administrator access. URL : https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?action=editDocu ment&documentId=AE2BB2412F20AA318525772E006F7014 This portlet provides an assortment of tools that are useful in troubleshooting content related issues.This portlet includes tools to view the JCR repository for WCM content, run an xpath query and view results, and directly execute various JSP's from support. These tools are commonly provided by support on a case to case basis to gather information specific to customer environment and content. With this portlet installed on the WCM system, it will help expedite the troubleshooting process. This also provides tools to clear all WCM Caches.

Split-second utility
Split-second is an innovative performance troubleshooting tool designed to fill the gap between no-cost but unreliable performance trouble shooting approaches and elaborate but expensive performance monitoring tools. URL : https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?action=editDocu ment&documentId=376ACFB8593EEC0A85257832005A4F8A

436 of 439

One of the main hurdles that developers and support personnel face when debugging performance issues is identifying the problem area(exact method) and also the stack leading up to it. Using Split-Second, anyone can build and deploy an instrumented module with minimal effort containing the suspect packages which would record the method call execution times and dump the thread stack when the times exceeds a certain threshold. The advantage of using this approach is that we do not need to hard code the logic in each and every method. No tracing needs to be enabled for the stack to be dumped and the response threshold times can be made configurable. Split-Second an extremely useful tool in the field to identify the performance bottleneck root cause very quickly. It is not specific to any product and can be used for any java based application. SplitSecond 3.x is currently not compatible with WCM syndication. Before using SplitSecond, disable automatic syndication as per the infocenter instruction.

437 of 439

The screenshot below shows after the data has been captured.

WebSphere Application Server extended cache monitor


Cache monitors are tools that allow system administrators to monitor and clear the different caches of a system providing a way to know if the cache system are configured in the right way. They also allow the cache to be cleaned between tests to be sure that response time won't be affected by elements cached in past tests. WebSphere Cache Monitor is an EAR installed as part of the WebSphere Application Server default installation but not deployed by default. More detail is available in WebSphere Application Server extended cache monitor. URL : http://www.ibm.com/developerworks/websphere/downloads/cache_monitor.html

438 of 439

439 of 439

You might also like