Wednesday, February 3, 2010

कस्तोमिसेद औथोरिंग टूल्स

Inline Editing

So now I have tested the inline editing jsp done by David De Vos.Simply brilliant!
Really offers you the ability to offer easier editing to content authors.

Attached Mr David De Vos's Code - Let me know if you have any hassles.

<%
%>
<%@page session="false" contentType="text/html" %>
<%@page import="com.ibm.workplace.wcm.api.*"%>
<%@page import="com.ibm.workplace.wcm.api.exceptions.*"%>
<%@taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %>

<%
// PURPOSE
// An example of a custom 'New' Authoring Tools link which allows the action to be targeted at
// a specific server as well as passing in the current site area and authoring template.
// In WCM 6.1, this JSP can be further customised to set the values of various fields, see
// the InfoCenter topic on Remote Actions for what is possible

// USAGE INSTRUCTIONS
// 1. Set the value of 's_authoringServerNameAndPort' to match the name and port of your authoring server
// NOTE: You will need to have single-sign working between the current server and the authoring otherwise the user
// will need to login
// 2. [Optional] Customise the HTML produced for the 'New' link on line 111
// 3. Add this JSP to the following locations on all authoring nodes and any rendering nodes that use Inline Editing
// \installedApps\WCM_Authoring_UI_1k9qukya.ear\1k9qukya.war\jsp\html
// \installedApps\WCM_Local_ng_Portlet_PA_dm010y1.ear\dm010y1.war\jsp\html
// \installedApps\\wcm.ear\ilwwcm.war\jsp\html (only required for servlet rendering)
// 4. Add a JSP Component that references this JSP
// 5. In your Authoring tools component, set the 'New action design' to a Component tag that references the library
// component created in step 4

// AUTHOR
// David de Vos
%>

<%!
// The name and port of your authoring server
String s_authoringServerNameAndPort = "[Auth server plus port ID]";
%>


<%
// Retrieve current users workspace
Workspace workspace = (Workspace) pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY);

// Retrieve the current Rendering Context
RenderingContext renderingContext = (RenderingContext) pageContext.getRequest().getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);

if ((workspace != null) && (renderingContext != null))
{
// Get current authoring template
DocumentId currentAuthoringTemplateId = null;
Content currentContent = renderingContext.getContent();
if (currentContent != null)
{
currentAuthoringTemplateId = currentContent.getAuthoringTemplateID();
}

// Get current site area
DocumentId currentSiteAreaId = null;
String fullPath = renderingContext.getPath();
if (fullPath != null)
{
String siteAreaPath = java.net.URLDecoder.decode(fullPath);
// If Content name is in path, then strip it out (won't be if current URL was to a site area)
if (currentContent != null)
{
int index = siteAreaPath.lastIndexOf(currentContent.getName());
if (index > 0)
{
siteAreaPath = siteAreaPath.substring(0, index-1);
}
}
DocumentIdIterator parentSiteAreaIdIterator = workspace.findByPath(siteAreaPath, Workspace.WORKFLOWSTATUS_PUBLISHED | Workspace.WORKFLOWSTATUS_EXPIRED);
if (parentSiteAreaIdIterator.hasNext())
{
currentSiteAreaId = parentSiteAreaIdIterator.nextId();
}
}

// Build 'New' link URL
StringBuffer newLinkURL = new StringBuffer();
newLinkURL.append("http://").append(s_authoringServerNameAndPort).append("/wps/wcmAuthoring");
newLinkURL.append("?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Content");
if (currentAuthoringTemplateId != null)
{
// Include the current authoring template if known
newLinkURL.append("&atid=").append(currentAuthoringTemplateId);
}
if (currentSiteAreaId != null)
{
// Include the current site area if known
newLinkURL.append("&pid=").append(currentSiteAreaId);
}

// Render the Link..
%>
New
<%
}
%>


Yours in Websphere

Jerome Slinger

Thursday, January 7, 2010

Selecting Web content libraries

Hi All (Especially for Brandon)

Selecting Web content libraries

You select which libraries will be available to users when using this authoring portlet in the Library Selection section.

To add a library, select a library in the left column, then click Add.

To remove a library, select a library in the right column, then click Remove.

Use the arrow buttons to change the order of the selected libraries.

This will determine the order the libraries will appear in the authoring portlet.

Note: Configuring or personalizing an authoring portlet

Libraries selected using the "configure" view are available to all users with valid access. Libraries selected with the "personalize" view are available for that user only.

The libraries available in the "insert links" and "insert images" dialogues are based on the libraries selected in the "configure" view. If you select a library in the "personalize" view that is not selected in the "configure" view, you will not be able to select items from this library when using the "insert links" and "insert images" dialogues.

You can select libraries specifically for the "insert links" and "insert images" dialogues by doing the following:

Go to Administration > WebSphere Portal > Portal User Interface > Manage Pages >.

Search for the page with the unique name of com.ibm.wps.hiddenpage.wcm.Authoring_Portlet.
Edit the page layout.
Edit the shared settings of the Web Content Authoring portlet.
Select the required libraries and click OK.
Click Done.

Now this might sound simple enough but eventually realizing that the hiddenpage Authoring Portlet resides in the content root makes it interesting.

Your in Websphere

Jerome Slinger

Wednesday, January 6, 2010

Writing links to Web Content Management Content

Links to content items can be written as URLs.

The following examples show how to write links to Web Content Management Content that are to be used with the rendering portlet.

Note: Non-ascii characters

Non-ascii characters can not be used in the query string section of URLs. For this reason, it is best not to name IBM® Lotus Web Content Management items using non-ascii characters if you plan to use URLs to call Web Content Management items.

To create a link from a piece of Web Content Management content to another piece of Web Content Management content, use the following URL format:

/[LIBRARY]/[SITE]/[SITE_AREA_PATH]/[CONTENT]

[LIBRARY] = the name of the Web content library.

[SITE] = the name of the site where the content resides.

[SITE_AREA_PATH] = the path to the site area where the content resides.

[CONTENT] = the name of the content item.

Linking to Web Content Management content from an external portlet or Web site
To create a link from an external portlet or Web site that displays Web Content Management content, use the following URL format:

http://[HOST]/wps/wcm/connect/[LIBRARY]/[SITE]/[SITE_AREA_PATH]/[CONTENT]

[HOST] = the name of the Web Content Management host.

wps/wcm = the Web Content Management context root.

[LIBRARY] = the name of the Web content library.

[SITE] = the name of the site where the content resides.

[SITE_AREA_PATH] = the path to the site area where the content resides.

[CONTENT] = the Name of the content item.

Linking to content displayed in a JSR 286 Web content viewer from an external portlet or Web site

To create a link from an external portlet or Web site to content displayed in a JSR 286 Web content viewer, use the following URL format:

http://[PORTAL_HOST]/wps/mypoc[/vp_mapping]?urile=wcm%3Apath%3A[LIBRARY]/[SITE]/[SITE_AREA_PATH]/[CONTENT][&page=unique_name | object_id | &mapping=mapping | ¤t=true]

[PORTAL_HOST] = the name of the Web Content Management host.

wps/mypoc = the Web Content Management context root, specifying the piece of content lookup service.

For protected access, use wps/mypoc.

For unprotected access, use wps/poc.

vp_mapping = the virtual portal mapping, if appropriate. For example, wps/mypoc/myvp or wps/poc/myvp.

[LIBRARY] = the name of the Web content library.

[SITE] = the name of the site where the content resides.

[SITE_AREA_PATH] = the path to the site area where the content resides.

[CONTENT] = the name of the content item.

To address a specific portal page, use one of the following parameters. The parameters cannot be combined.

page: Specify the unique name or the object ID of the page.

mapping: Specify the URL mapping for the page.

current: Indicates that the current page should be used.

Dynamic page lookup: The page parameter is optional. You can use the link broadcasting feature of the JSR 286 Web content viewer to dynamically look up pages by simply omitting the page parameter. For example, if you have a content item called News1, stored in the library Web Content under the site My Site and the site area News, you can create a link to that content item with the following URL:
http://host_name/wps/mypoc?urile=wcm%3Apath%3A/Web+Content/My+Site/News/News1

Alternatively you can also add a specific portal page using a URL mapping by using the following format:

http://[PORTAL_HOST]/[PORTAL_CONTEXT_ROOT]
/[PORTAL_PAGE_URL_MAPPING]/?current=true&urile=wcm%3Apath%3A[LIBRARY]/[SITE]/[SITE_AREA_PATH]/[CONTENT]


[PORTAL_HOST] = the name of the portal host

[PORTAL_CONTEXT_ROOT] = the portal context root. For anonymous sites use /wps/portal, otherwise use /wps/myportal

[PORTAL_PAGE_URL_MAPPING] = the compound name of the portal URL mapping to the portal page that contains the Web Content Management portlet (URL mappings can be set up using the portal administration portlets).

[LIBRARY] = the name of the Web content library.

[SITE] = the name of the site where the content resides.

[SITE_AREA_PATH] = the path to the site area where the content resides.

[CONTENT] = the name of the content item.

Note: The JSR 286 Web content viewer on the target page must be configured to receive links from Other portlets and this portlet.
Changing Web Content Management content via a Rendering Portlet from an external portlet or Web site
To create a link that causes an existing Rendering Portlet to display different Web Content Management Content, use the following URL format:

http://[PORTAL_HOST]/[PORTAL_CONTEXT_ROOT]
/[PORTAL_PAGE_URL_MAPPING]/?WCM_GLOBAL_CONTEXT=[ILWWCM_PAGE_URL]

[PORTAL_HOST] = the name of the portal host

[PORTAL_CONTEXT_ROOT] = the portal context root. For anonymous sites use /wps/portal, otherwise use /wps/myportal

[PORTAL_PAGE_URL_MAPPING] = the portal URL mapping to the portal page that contains the Web Content Management Portlet (URL Mapping's can be setup via the Portal Server Administration).

[ILWWCM_PAGE_URL] = the full URL to the Web Content Management Content.
Changing Web Content Management content via a Rendering Portlet from Web Content Management content

To create a link in Web Content Management Content that causes an existing Rendering Portlet to display different Web Content Management Content, use the following URL format:

http://[PORTAL_HOST]/[PORTAL_CONTEXT_ROOT]/[PORTAL_PAGE_URL_MAPPING]
/?WCM_GLOBAL_CONTEXT=/[LIBRARY]/[SITE]/[SITE_AREA_PATH]/[CONTENT]


[PORTAL_HOST] = the name of the portal host

[PORTAL_CONTEXT_ROOT] = the portal context root. For anonymous sites use /wps/portal, otherwise use /wps/myportal

[PORTAL_PAGE_URL_MAPPING] = the portal URL mapping to the portal page that contains the Web Content Management Portlet (URL Mapping's can be setup via the Portal Server Administration).

[LIBRARY] = the name of the Web content library.

[SITE] = the name of the site where the content resides.

[SITE_AREA_PATH] = the path to the site area where the content resides.

[CONTENT] = the name of the content item.

Adding cache paramters to a URL
You can add Web content Cache parameters and Cache expire parameters to a URL to custom caching strategies to individual items. For example:

http://[HOST]/wps/wcm/connect/[LIBRARY]/[SITE]/[SITE_AREA_PATH]/[CONTENT]>?cache=site&contentcache=session

Adding a last modified parameter to a URL
You can add the last modified date of the current content item to the header of the rendered page. For example:

http://[HOST]/wps/wcm/connect/[LIBRARY]/[SITE_AREA_PATH]/[CONTENT]>?returnLastModified=true

Thursday, December 17, 2009

JCR Explorer and XPath

Been running a lot of XPath queries in JCR explorer these days, trying to fix some syndication issues.

For example, getting error...

Could not save item with id DepRef(id:121212121 type: com.aptrix.pluto.site.SiteArea nonDraft:true draft:false purged:false parentId:919191919 timeStamp:123 stateUpdate: false versions:null moved: false) because it could not find its parent.

...means parent uuid on subscriber does not match parent uuid on syndicator. To verify, in JCR Explorer, run the following queries on both systems...

//element(*, ibmcontentwcm:siteArea)[@jcr:uuid = '121212121']
//element(*, ibmcontentwcm:siteArea)[@jcr:uuid = '919191919']

You will undoubtedly find both uuids on syndicator, but not subscriber. This will be the case even if site areas show as existing on both machines from within the authoring portlet on the subscriber.

One way to fix...

1. Delete site area child and parent on subscriber
2. Edit site area on syndicator and then save, to give item a fresh time stamp.
3. Re-syndicate

I will be adding some more syndication solutions based on the questions I have received.

Sunday, December 13, 2009

Using the Member fixer for IWWCM

Overview

Use the member fixer tool to check whether any Member Manager users or groups referenced in IWWCM items have been renamed or deleted.

The member fixer tool will not work if there are any locked items in a Web content library.

For a large number of items, use the WAS Admin console to increase the session timeout setting of the server...

Application Servers | WebSphere_Portal | Container Settings | Web Container Settings | Session Management

Run the Member Fixer Module if any of the following conditions have occurred:

* A user or group has been permanently removed from WebSphere Portal.

* If WebSphere Portal security has been enabled or disabled (or Syndicated from another server with different WebSphere Portal security settings)

* If the LDAP structure has been modified

* If you have moved your data to a Portal server and WMM is configured to use its default auto-generated ID (rather than a unique attribute from each users LDAP record).

* A user or group has been removed and then re-added to WebSphere Portal, and WMM is configured to use its default auto-generated ID (rather than a unique attribute from each users LDAP record).

Note that if the Principal Information Cache is enabled (available with PK32457 but not enabled by default), then run the Member Cache Manager Module as described in the iFix read-me before running the Member Fixer


Usage

1. To view a report of Member Manager users or groups, using a browser, open the member fixer tool...

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname

2. If there have been changes to Member Manager users and groups, update the items that reference them. Open the following URL in the browser:

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname&fix=true

3. If the member fixer tool indicates that certain mismatched member conditions exist, enter the specified URL to correct the conditions.

For nonexistent users or groups have alternate distinguished names (DNs) available.

* To update the items that reference the nonexistent users or groups:

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname&fix=true&alt_dn=update

* To remove the members that reference the users or groups:

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname&fix=true&alt_dn=remove

For Users or groups have been found with mismatched external IDs in Member Manager.

* To update the external IDs in Member Manager with correct external IDs:

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname&fix=true&mismatched_id=update

To remove those users and groups with mismatched external IDs:

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname&fix=true&mismatched_id=remove

These URL options can be combined when the conditions occur at the same time. For example, if alternate DNs are available for nonexistent users and groups and there are mismatched external IDs in Member Manager, we might use the following URL:

http://host:port/wps/wcm/connect?MOD=MemberFixer&library=libname&fix=true&alt_dn=update&mismatched_id=update

Cannot locate Presentation Template for Template

This was a request from a user so here's the error and its solution (encountered during search) :

[15/11/08 3:35:38:180 SAST] 0000009c HttpConnectio 3 com.ibm.crawler.HttpConnection 10: http://host/wps/wcm/myconnect/library/sitename/site area/image.jpg request sent
[15/11/08 3:35:38:180 SAST] 0000009c Node 1 com.ibm.crawler.Node 40: checkNodeFlags: res= false, flag= NODE_FLAG_UTF_8_CONVERSION_FAILED
[12/11/09 3:35:38:346 SAST] 00000078 RendererModul W IWKPL1453X: Exception occured while processing request: com.aptrix.pluto.renderer.BadPathInfoException:
IWKPL1224X: Cannot locate Presentation Template for Template {bf06d0804b429520bae8fbb461ad4639, com.aptrix.pluto.presentation.Template, Authoring-Template-File-Resource, }

Solution:

This error indicates that an authoring template was added to a site area but it wasn't mapped to a presentation template.IWWCM can not map it thus wont be able to render it.Use the location given, http://host/wps/wcm/myconnect/library/sitename/site area/image.jpg and navigate to the site area.

Steps to follow :

1. Select the site area
2. Select edit (Edit the site area)
3. Select template mapping
4. Map the authoring template to a presentation template
5. Save your changes

Your error has now been resolved.

Render content title from within a Menu Component

When used in the "Design for each menu search result:" section of a Menu Component, this tag will render the title of the current content item being iterated over:


Back to Top


This is very useful when using dynamic menus o display content.

Link to portal page and a WCM Site

This piece of code shows an example for how to link to a specific portal page and a WCM Site. The portal page is defined by a friendly URL mapping in WPS Remember that URL mapping is an option to you as an administrator.. In this case that URL mapping is called View. The View page is identified in the tag as the portalTarget. The portal page must have a WCM content display portlet that is configured as a listener.

<a href='context="selected" name="content/op" type="site" mode="portal" portalTarget="View"/>'>Office Productsa>

Note: If successfully configured, this tag should automatically generate an id attribute on save.

Tuesday, December 8, 2009

Talking the Talk

These common terms are used when describing IBM Lotus WCM

Elements

Elements either store Web content or generate

web content. Elements do not exist as free standing items. You store elements in "container" items.

Items

Items can be considered as "files" or "documents"
and are used to store Web content, metadata and access control information.
There are four item-types:






Container items




  • Sites
  • site areas

  • content items
  • components



Represent different sections of a site framework.
Template items


  • Authoring templates
  • Presentation templates



An authoring templates defines:


  • which data entry fields are visible on a content item form.
  • the default values for each setting and field on a content item form.


A presentation template defines:



  • The layout of elements and components that are displayed on a Web page.
  • The default properties of a Web page.





Profile items


  • Taxonomies
  • categories




You use categories to profile certain item-types, such
as content-items. A category refers to the subject matter of your content.
You group categories within taxonomies.

Workflow items


  • Workflows
  • workflow stages
  • workflow actions



You use

workflows to control the access to, verification and eventual approval of WCM items.

When creating a workflow, you select a set of workflow stages. Workflow actions are executed upon entering or exiting a workflow stage.


Site framework

A site framework is a similar concept

to the "site map" of a traditional Web site. Whereas a site map is based on a directory structure or the links between pages in a Web site, a site framework
consists of a set of WCM items.
Each site framework consists of a single site under which a set of site areas
and content items are grouped.


Template maps

When a content item is rendered, the presentation template used to display the content item is determined by the current template map. A template map is defined in a site or site area and consists of a pairing of an authoring template with a presentation template.

Profiling

You use the profiling features of Web

Content Management to group content items into different types of content.
Content items are profiled using categories or keywords, and by locating content
items under different sections of a site framework.

Workflow

A workflow is used to manage the verification process of WCM items.An item is published only when it has been approved in every stage of a workflow.














Tuesday, May 5, 2009

The WCM Diaries

My name is Jerome Slinger and I am a Senior WebSphere Integration Specialist.


This site contains my findings and learning during my career. This site is independently owned and not affiliated, supported by, or endorsed by IBM.
So you are starting a IBM Workplace Web Content management project(WCM/IWWCM) but your first point of contact should be your project plan.

What are you going to need?Where do you start?I hope that this site will offer you some assistance and enlightenment.

Feel free to join and mail me questions that may not be covered on the blog.

So lets look at some pre-requisites for our project:

Make sure you have the correct skill set

I have heard people say that your content authors do not need to know HTML, this is true, but I always recommend clients to consider a skilled workforce.

Get training or assistance from an experienced WCM Services resource. Many projects fail because customers attempt to use WCM out-of-the-box without obtaining the proper skilled resources.
Never be afraid to ask the experts or to raise a PMR

Those who Fail to Plan, Plan to fail.(Consider the following points)

  • Gather your business requirements
  • What is your operational requirements
  • Long Term Needs
  • Users and their objectives
  • Information architecture
  • Site Framework
  • Site Categories
  • Taxonomies
  • Workflow model
  • Library architecture
  • Authoring and presentation templates
  • Deployment architecture
  • Security model
And yes there is so much more to consider. I will start and on a weekly basis add more and more information.

If you would like me to add to the WCM Diaries , feel free to mail me.






Generate reports from Opportunities using a Visualforce Page in Salesforce

  Step 1: Create a Visualforce Page Go to the Setup menu in Salesforce. Search for "Visualforce Pages" in the Quick Find box and c...