Pages

Monday, December 21, 2015

How to overwrite a template in UCM page for customization ?






Purpose : How to overwrite a template in UCM page for customization .


Example : In this example we overwrite “Active Workflows” page . Which can 


be located at

Content Management → Active Workflows

IdcService : IdcService=GET_ACTIVE_WORKFLOWS

URL : http://IP:PORT/cs/idcplg?IdcService=GET_ACTIVE_WORKFLOWS




Detailed Steps :

1. Find out which template is used :


Template Class : Workflow
Template FilePath : Path of htm file used
Template Name : WORKFLOW_LIST
Template Type : WorkFlowListPage



2. Go to file system , which mention in Template FilePath .

3. Edit the workflow_list.htm
Add below line before <$include std_page_end$> :

Example
<br style="line-height:15px">

Added Manually in the file

<$include std_page_end$>

</body>
</html>



4. Re load the same page again in WCC . It should show the whatever added in the htm file




















This will make sure that , we are editing the correct template file . But this can't be done in proudction because every patch update will overwrite htm . So we have to create a custom component to overwrite htm file . That will save the htm file from “patching”

5. Going to create new custom component .

Start ComponentWizard from file system

6 . Add →

Name : OverWriteWorkFlowList











































7. Click Ok

8. Click on “Add” in Component page , Select “Template”

9.Next -->(Use default options)---> Next

10. On Add Intradoc Template page

Name : WORKFLOW_LIST
Select “Copy From” –> Browse → workflow_list.htm
Class : Workflow
Type : WorkFlowListPage

FileName: NewWorkFlowList.htm ( You can give any Name )
Description : Provide anything

Check Step1 for how to get those 4 details :



















































11. Finish , it will show message which provides the status

12. Go to Build → Build Settings

Wait for default values to load , then click ok

13. Go to Build – > Build

Wait for default values to load , then click ok

14. Go to Options → Enable


Since htm files are dynamic , we can edit “on the go” 









 









































Before restarting the WCC server , compare with above screen shot


15. Restart the WCC server


16. Go to File system ,where custom component are created .

Usually it will be : <domain>/ucm/cs/custom/OverWriteWorkFlowList

Go to templates/ Directory :

Same step can be done from ComponentWizard applet ,by click on Launch editor ( if you select the default editor )


17. Remove the lines added manually before (Step 4) and Add new Line

Like Added from CUSTOM component

18. Reload the page

19. It will show new date updated on Step 17

Key of Custom Component creation is

Any update in hda file , Restart is required
Any update in htm file , Restart is NOT required


No comments:

Post a Comment