Thursday, 15 March 2012

Relative URLs and WebCenter

You want to write code in webcenter resources that's re-usable accross all instances (DEV-TEST_UAT-PROD).


Ensure you reference all UCM resources with either  a single '/', or a double '//' at the start of the relative reference. A good way to get all your images to load is to use single slash for all of them, and those that don't load maybe in a content presenter template or other, use the double slash.


Word to the wise, slash first. Not to get slashed later.

Always show UCM skin images in webcenter

If images aren't loading without being logged on to UCM (in another browser tab) when viewing webcenter, follow the steps below:
  • First ensure you put your skin's images in a folder under Contribution Folders.
  • Second web map your skin folder in ucm. (in your webcenter skin reference the web mapped URLs)
  • Third, use the image metadata profile for all images.
  • Fourth, use the WebCenterSpaces security group, not the public group.
Now all your UCM skin images will load regardless of being logged on to UCM.
If even one of your images does not adhere to this metadata combination all of your images will fail to load.

Wednesday, 14 March 2012

A better Find in linux

Looking for a file on linux?
Want to search to whole machine and you're getting permission denied errors?

Use this command:
find / -name YOUR_SEARCH_WORD_HERE 2>/dev/null

Tuesday, 28 February 2012

Enhancements to Content Presenter Image Gallery

Original code and instrucions:
(credit John Brunswick and Kyle Hatlestad)

The following is an enhancement of the image gallery template.
Prereqs: 
-Requires static renditions to be accessible, need config.cfg renditions for preview and thumbnail. You can just google that
-Requires dispersion to be turned off, kyle has an article on this

You'd replace the iterator code in the template with the below:
<af:iterator rows="0" var="node" varStatus="iterator" value="#{nodes}" id="it0">       
 <af:outputText escape="false" value="&lt;a class=&quot;grouped_elements&quot; title=&quot;#{node.propertyMap['xComments'] != 'xComments: ' ? node.propertyMap['xComments'].asTextHtml : node.propertyMap['dDocTitle'].value.stringValue}&quot; rel=&quot;group&quot; href=&quot;/cs/groups/#{fn:toLowerCase(node.propertyMap['dSecurityGroup'].value.stringValue)}/documents/#{fn:toLowerCase(node.propertyMap['dDocType'].value.stringValue)}/~extract/#{node.propertyMap['dDocName'].value.stringValue}~1~staticrendition/preview.gif&quot;>"/>       
 <af:image source="//cs/groups/#{fn:toLowerCase(node.propertyMap['dSecurityGroup'].value.stringValue)}/documents/#{fn:toLowerCase(node.propertyMap['dDocType'].value.stringValue)}/~extract/#{node.propertyMap['dDocName'].value.stringValue}~1~staticrendition/thumbnail.png" styleClass="gallery"/>         
<af:outputText escape="false" value="&lt;/a>"/>     
</af:iterator>

This allows any security group, or document type on checkin, also uses relative urls.
It standardizes the thumbnail and enlarged size to the standard IBR renditions.

The only remaining issue with this code, is if you put the image inside a space rather than any contribution folder, it requires the auth and account value to be dynamically set in the folder path. I haven't worked out how to do string manipulation to make this dynamic. EL APIs are still a mystery to me, anyone with a good link? As a result this code only supports sourcing the images from any contribution folders.
Also the folder must only contain images. If your images are in folders with mixed content or sub folders, you need to use a list rather than point presenter to a folder.

Wednesday, 26 October 2011

Content Presenter document preview on linux server

When displaying a document from the Doc Lib in Webcenter, you may be getting the properties for the file but not the web preview.

If you have setup Webcenter and UCM/IBR following the documentation, you may be missing the PDF third party font path. If you don't set this up conversion to PDF may fail and pass through.

Steps
Go to IBR
http://myserver:16250/ibr
login as weblogic and your password.
Click on Conversion Settings and the options button for OutsideIn Filter.
Input the path to TrueTypeFont.
In my case my linux didn't have the fonts. However some were included in the JRE of webcenter.
You can go to your middleware home and perform a Find -name fonts, in case you can't find them.





After including the setting documents preview correctly.
For power point slides ensure you had the Powerpoint slider ucm component before enabling the webcenter configure component. You can check by browsing dynamic conversion templates from UCM power user interface.

Tuesday, 18 October 2011

Adding a taskflow from composer goes to a blank page

If this happens to you, you're probably using a custom catalog on PS4 (this bug will be fixed in PS5).
This happens because when you create a custom catalog, spaces somehow eats some of the single quotes in taskflow definitions.

In the meantime here are simple steps to fix this issue:
Get the code for the custom catalog, then copy it into a notepad, then performed a replace all on:
#{uib_o_w_s_r_DefaultGroupSpaceCatalog[
replaced with
#{uib_o_w_s_r_DefaultGroupSpaceCatalog['

then to adjust for those entries which already had the quote, another replace all:
#{uib_o_w_s_r_DefaultGroupSpaceCatalog[''
replaced with
#{uib_o_w_s_r_DefaultGroupSpaceCatalog['

Try to add your taskflow again and it should now work normally.

Wednesday, 12 October 2011

Content Presenter templates not showing sitestudio templates?

This happened to me during an implementation. I couldn't confirm if it was documented somewhere, but to get content presenter templates to work, you must enable the SiteStudio for External Applications UCM component. Simply tick it from the UCM Admin Server component page. That's where the code which allows the templates to show in WebCenter Spaces resides.