Friday, December 17, 2010

Creating a New Site Area using the IBM WCM API

<%@ page import="com.ibm.workplace.wcm.api.*"%>
<%@ page import="java.util.*"%>
<% // retrieve repository Repository repository = WCM_API.getRepository(); // get workspace for current user Workspace workspace = repository.getWorkspace(request.getUserPrincipal()); // Set library workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("WebContent")); DocumentId documentId = null; Site parentSite = null; String parentSiteName = "Site"; DocumentId siblingId = null; // find parent site DocumentIdIterator siteIterator = workspace.findByName(DocumentTypes.Site,parentSiteName); if (siteIterator.hasNext()){ documentId = siteIterator.nextId(); parentSite = (Site) workspace.getById(documentId); // create new sitearea SiteArea newSiteArea = workspace.createSiteArea((DocumentId)parentSite.getId(),siblingId,ChildPosition.END); newSiteArea.setName("NewSiteArea"); newSiteArea.setTitle("NewSiteArea"); newSiteArea.setDescription("New Sitearea Created using WCM API String[] saveMessage = workspace.save((Document)newSiteArea); if (saveMessage.length==0) { out.println ("
Created new Sitearea under " + parentSiteName );
}
} else {
out.println ("
Could not find parent Site " + parentSiteName + ". Could not create a
new Sitearea." );
}
%>

New Site Creation

Create a new Website using the IBM WCM API

<%@ page import="com.ibm.workplace.wcm.api.*"%>
<%@ page import="java.util.*"%>
<% // retrieve repository Repository repository = WCM_API.getRepository(); // get workspace for current user Workspace workspace = repository.getWorkspace(request.getUserPrincipal()); // Set library workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("WebContent")); // create new site Site newSite = workspace.createSite(); newSite.setName("Jerome"); newSite.setTitle("JeromeSlinger"); newSite.setDescription("New Site Created using WCM API"); String[] saveMessage = workspace.save((Document)newSite); if (saveMessage.length==0){ out.println("Could not create new Site..
");
}else{
out.println("New Site created successfully.");
}
%>

Thursday, December 2, 2010

Creating a Default Portal Search Service Collection and Content Source

Step One - Log in to Portal / WCM Design



Now navigate to Administration



1.Click on Search Administration > Manage Search
2.Click on Search Collections



3.Click on New Collection
4.Add Search Collection detail and click OK



N.B.The red areas are where you enter your own Collection details

5.Check that the Search Collection was created successfully
6.Click on Log Out



OK, we are not done yet!So now.....

Create the Portal Search Content Source

1. Log into IBM WCM
2. You will now go to the Web Content and NOT the admin console
3. Select the library you wish to add to your collection
4. Select Site Areas>By SITE>Click Edit

N.B.You need to select the tick box next to the site on the right hand-side and click edit.

5.Select Search>Tick Searchable
6.From the Drop-down select your Search Service
7.Select your Search collection
8.Set User ID and Password and Click on Save

OK, Now we are making progress....but we are not done YET!

Ok Here we go....

1. Click Launch (Top left Corner)
2. Select Administration from the Drop-down
3. Select Manage Search
4. Click on Search Collections
5. Click on the collection you want to add the Content Source too
6 Click on Edit Content Source of the Content Source that was created

Now this part is extremely important!

1. Change General Parameters
> Stop collecting after (min) to Unlimited
General Parameters > Stop fetching a document after (sec) to Unlimited

2. Change Schedulers > Define Schedule > At to 22 00
Change Schedulers > Define Schedule > Update every to 1 day(s) and click Create
Select Scheduled Updates > Schedule that was created by default and click Delete
> CLICK SAVE!
>Check that the Content source was created without errors
>The crawler will run with the next run date and time

N.B. I was using 22 00 as an example so please amend this to your own requirements.


Now I am going to share a secret with you that will save you a lot of time....come closer....this is serious....you will thank me later.

On the left hand side of your admin console do the following:

1.Click on Access > Resource Permissions > PSE Sources
2.Click on Assign Access for your collection
3.Click on Edit Role for the User role
4.Add anonymous Portal user

Well Done!!

We will make you a WebSphere guru yet!

Monday, November 22, 2010

Component Reference Errors

This week we are covering Reference errors:


Error Example


11/22/10 10:48:47:440 SAST] 000001e4 PackageProces W Could not resolve a reference from item of type com.aptrix.pluto.cmpnt.HTMLCmpnt and name xxxxxxx to an item with id {xxxxxxxxxxxxxxxxxxxxxx, com.aptrix.pluto.cmpnt.ImageResourceCmpnt}. The reference is of type com.aptrix.deployment.subscriber.SyndicationReferenceResolver$ArrayCmpntHandler$ArrayElementReference.
[11/22/10 10:48:47:693 SAST] 000001e4 PackageProces W IWKPD1029X: Could not store doc: xxxxxx, IdRef: {xxxxxxxxxxxxxxxxxxxx, com.aptrix.pluto.cmpnt.HTMLCmpnt}

So now we have seen the snippet from our System log but where to from here.

Points to take note of:

1. In our error strings we can deduce the following:
1.1. We have a reference from an HTML component which WCM can not resolve
1.2. This example error occured during syndication
1.3. The document has not been moved

Steps to take:

1.Navigate to the library containing the component
2.Search for the component (use filter as the system log gives us the name)
3. Select the component and edit.
4. Check the current links contained in the component.
5. Remember that our error is related to an item which the component is linking too.
6. Repair the link issue

....and thats it folks.

I will keep on posting various types of errors and discoveries as I go along.
Please feel free to mail me any issues and I will blog solutions.

Your in Websphere
J

Friday, May 7, 2010

Bulk PDF or file Upload with IBM WCM

Hi All

Now I know there's been a lot of request for a bulk up-loader using the API for WCM.
So you as the old saying goes ...ask and you shall receive.

String libraryName = null;
Workspace workspace = null;
DocumentId authTempId = null;
DocumentId workflowId = null;
String destinationSitearea = null;

void uploadFiles(JspWriter out) {
File baseDir = new File(destFolder);
try {
if (!baseDir.exists()) {
System.out.println("Bulk uploader: path does not exist - " + destFolder);
return;
}
File[] buDirs = baseDir.listFiles();
for (int i = 0; i <>
if (buDirs[i].isFile()) {
continue;
}
// you need to get the sitearea destination first
File textFile = new File(buDirs[i], "sitearea.txt");
if (!textFile.exists()) {
continue; // textFile contains destination sitearea
}
destinationSitearea = getDestinationSitearea(textFile);
if (destinationSitearea == null) {
continue; // nonsensical destination area retrieved
}

File[] files = buDirs[i].listFiles();
for (int m = 0; m <>
if (files[m].isDirectory()) {
// files[m].delete();
continue;
}
boolean hasUpdated = false;
if (files[m].getName().toLowerCase().endsWith(".pdf")) {
hasUpdated = updateWCMPage(files[m], out);
}
if (hasUpdated) {
out.println("File uploaded: " + files[m].getAbsolutePath() + "
");
files[m].delete();
} else {
if (files[m].getName().toLowerCase().endsWith(".pdf")) {
out.println("Failed to update file '" + files[m] + "' into wcm
");
}
}
}
}

} catch (SecurityException se) {
} catch (IOException ioe) {
}
}

boolean updateWCMPage(File file, JspWriter out) {
boolean hasUpdated = false;
try {
try {
if (workspace == null) {
workspace = WCM_API.getRepository().getWorkspace(wcmUserName, wcmUserPassword);
}
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary(libraryName));
DocumentIdIterator contentIterator = workspace.findContentByPath(destinationSitearea + file.getName());

if (contentIterator.hasNext()) {
DocumentId contentId = (DocumentId) contentIterator.next();
Content content = (Content) workspace.getById(contentId);

TextComponent txtName = (TextComponent) content.getComponent("Name");
txtName.setText(file.getName());
FileComponent fileComponent = (FileComponent) content.getComponent("File");

FileInputStream fin = new FileInputStream(file);
byte[] fileContent = new byte[(int) file.length()];
fin.read(fileContent);

if (!workspace.isLocked(contentId)) {
fileComponent.setFile(file.getName(), fileContent);
content.setComponent("File", fileComponent);
content.setComponent("Name", txtName);

String[] errors = workspace.save(content);
for (int j = 0; j <>
out.println("Error saving page" + errors[j]);
}
if (errors.length == 0) {
hasUpdated = true;
out.println("Content page '" + destinationSitearea + file.getName() + "' has been updated
");
} else {
StringBuffer buffer = new StringBuffer();
for (int k = 0; k <>
buffer.append(errors[k]);
}
out.println("Errors updating content page '" + destinationSitearea + file.getName() + "' " + buffer.toString() + "
");
}
} else {
out.println("Contet page '" + file.getName() + "' is locked currently locked by another user.
");
}

} else { // page does not exist
DocumentIdIterator siteareaIterator = workspace.findContentByPath(destinationSitearea);
DocumentId defContentId = null;
DocumentId siteareaId = null;
boolean validPath = false;
if (siteareaIterator.hasNext()) {
defContentId = siteareaIterator.nextId();
Content defContent = (Content) workspace.getById(defContentId);
defContent.getDirectParent(); // used to get sitearea
siteareaId = defContent.getDirectParent();
validPath = true;
}

if (validPath) {
setAuthoringTemplateId(out);
setWorkflowId(out);
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary(libraryName));
Content addedPage = workspace.createContent(authTempId, siteareaId, null, ChildPosition.END);
addedPage.setWorkflowId(workflowId);
System.out.println("trying to process '" + file.getName() + "'");
String pageName = file.getName();
pageName = pageName.replaceAll("[^a-zA-Z._-]", "");
addedPage.setName(pageName);
if (!addedPage.isPublished()) {
if (addedPage.isDraft()) {
out.println("Content page '" + destinationSitearea + pageName + "' is in the draft state
");
TextComponent txtName = (TextComponent) addedPage.getComponent("Name");
txtName.setText(file.getName());
FileComponent fileComponent = (FileComponent) addedPage.getComponent("File");

FileInputStream fin = new FileInputStream(file);
byte[] fileContent = new byte[(int) file.length()];
fin.read(fileContent);

fileComponent.setFile(file.getName(), fileContent);
addedPage.setComponent("File", fileComponent);
addedPage.setComponent("Name", txtName);
addedPage.addHistoryLogEntry("New page created: " + file.getName());

String[] errors = workspace.save(addedPage);
for (int j = 0; j <>
System.out.println(errors[j]);
}
addedPage.nextWorkflowStage();
out.println("Content page '" + destinationSitearea + pageName + "' moved to the approved state
");
addedPage.nextWorkflowStage();
out.println("Content page '" + destinationSitearea + pageName + "' moved to the published state
");
hasUpdated = true;
}
}
} else {
out.println("Error: Please ensure your sitearea '" + destinationSitearea + "' has its default content set");
}
}

} catch (OperationFailedException ofe) {
out.println("Error: Operation failed: " + ofe.getMessage() + "
");
} catch (ServiceNotAvailableException snae) {
out.println("Error: Service not available: " + snae.getMessage() + "
");
} catch (DocumentRetrievalException dre) {
out.println("Error: Unable to retrieve document: " + dre.getMessage() + "
");
} catch (AuthorizationException ae) {
out.println("Error: Authorization problem: " + ae.getMessage() + "
");
} catch (DocumentCreationException dce) {
out.println("Error: Unable to create document: " + dce.getMessage() + "
");
} catch (IllegalDocumentTypeException idte) {
out.println("Error: Wrong document type: " + idte.getMessage() + "
");
} catch (PropertyRetrievalException pre) {
out.println("Error: Unable to get document workflow stage: " + pre.getMessage() + "
");
} catch (NoMoreWorkflowStagesException nmwfse) {
out.println("Error: " + nmwfse.getMessage() + "
");
} catch (DocumentSaveException dse) {
out.println("Error: Unable to save new document: " + dse.getMessage());
} catch (DuplicateChildException dce) {
out.println("Error: Duplicate page: " + dce.getMessage());
} catch (ComponentNotFoundException cne) {
out.println("Error: Authoring template element not found: " + cne.getMessage());
} catch (IllegalTypeChangeException ile) {
out.println("Error: Illegal AT type: " + ile.getMessage());
}
} catch (IOException ioe) {
}
return hasUpdated;
}

String getDestinationSitearea(File file) {
String sitearea = null;
try {
FileInputStream fin = new FileInputStream(file);
byte[] fileContent = new byte[(int) file.length()];
fin.read(fileContent);
String content = new String(fileContent);
content = content.toLowerCase().trim();
if (!content.startsWith("/")) {
content = "/" + content;
}
if (content.endsWith("\n")) {
content = content.replaceAll("\n", "");
}
if (!content.endsWith("/")) {
content = content + "/";
}
String[] segments = content.split("/"); //obtain library name from path
libraryName = segments[1];
sitearea = content;

} catch (IOException ioe) {
}
return sitearea;
}

void setAuthoringTemplateId(JspWriter out) {
try {
try {
if (authTempId == null) {
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("documents"));
DocumentIdIterator docIds = workspace.findByType(DocumentTypes.AuthoringTemplate);
while (docIds.hasNext()) {
authTempId = (DocumentId) docIds.next();
AuthoringTemplate at = (AuthoringTemplate) workspace.getById(authTempId);
String name = at.getName();
if (name.equalsIgnoreCase("at-file-resource")) {
break;
}
}
}
} catch (DocumentRetrievalException dre) {
out.println("Error: Unable to retrieve document: " + dre.getMessage() + "
");
} catch (AuthorizationException ae) {
out.println("Error: Authorization problem: " + ae.getMessage() + "
");
}
} catch (IOException ioe) {
}
}

void setWorkflowId(JspWriter out) {
try {
try {
if (workflowId == null) {
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("documents"));
DocumentIdIterator docIds = workspace.findByType(DocumentTypes.Workflow);
while (docIds.hasNext()) {
workflowId = (DocumentId) docIds.next();
Workflow wf = (Workflow) workspace.getById(workflowId);
String name = wf.getName();
if (name.equalsIgnoreCase("wf-documents")) {
break;
}
}
}
} catch (DocumentRetrievalException dre) {
out.println("Error: Unable to retrieve document: " + dre.getMessage() + "
");
} catch (AuthorizationException ae) {
out.println("Error: Authorization problem: " + ae.getMessage() + "
");
}
} catch (IOException ioe) {
}
}

boolean isEmpty(String value) {
if (value == null || value.trim().length() == 0) {
return true;
} else {
return false;
}
}

%>



Yours in Websphere
Jerome Slinger

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

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...