Monday, December 20, 2010

Adding profiles to COLLECTION_DISPLAY template

I have a requirement to allow users to check-in files inside folders according to a chosen profile, this will not be done from WebDAV it will be from the UCM Web Interface.

So in this case we need to customize with COLLECTION_DISPLAY template or resources used inside it.

After investigations I found that I need to customize the two resources collection_explore_menus, and new_content_form

For example I created a new profile called Processes, and I want to add it as a link under New Content link. In the first resource collection_explore_menus we will add the following at the end of the resource

FOLDER_EXPL_NEW_CONTENT_Processes,  FOLDER_EXPL_NEW_ITEM,     70,        wwArchiveProcesses,    javascript:document.newcontentformProcesses.submit(),


id            = FOLDER_EXPL_NEW_CONTENT_Processes
labelKey = wwArchiveProcesses
href        = javascript:document.newcontentformProcesses.submit()

Then as you noticed we are firing Submit action for a HTML form called newcontentformProcesses which has to be created by us and here comes the role of the next resource new_content_form, so will add the following to the resource and after the first HRML form there

<form action="<$HttpCgiPath$>" method="GET" name="newcontentformProcesses">

<input name="IdcService" type="hidden" value="CHECKIN_NEW_FORM" />
<input name="<$collectionIDMeta$>" type="hidden" value="<$dCollectionID$>" />
<input name="xIdcProfile" type="hidden" value="wwArchiveProcesses" />


Notice the hidden field xIdcProfile which is the profile trigger metadata field.

I hope this post will be helpful

No comments: