Tuesday, January 20, 2009

How to create 'Edit My Profile' link in custom theme



You may come across a scenario where you need to build a custome theme for the portal in which you need to hide the default lunch button and main menu. By doing this you found that "Edit My Profile" link normally accessed via the Launch button is also hidden.Therefore there is a need to display "Edit My Profile" link in the custom theme that displays at the top of each page.Link should also behave exactly the same way as the one in main menu.


Here are the steps you should follow to get the 'Edit My Profile' link working in your custom theme:

  1. First you need to create a unique name for the portlet on selfcare page in portal.Use XMLAccess to export the selfcare page.

    • Login to the portal with admin access and navigate to the Edit My Profile Page.

    • There is an icon for exporting a page. Click on that.

    • This will generate an XML file "pageExport.xml", save this on your system.

  2. Update the file so that it has the basic format shown below. Delete the tags and add the uniquename attribute to the final tag as shown below in bold. Add nothing else; delete nothing else.


  3. Save and close the file.

  4. Open this xml file into the portal by navigating to Administration->WebSphere Portal->Portal Settings->Import XML->

    • Browse the xml file on your system and click on the import button. See for the message successfully imported.
  5. Open the Default.jsp file in your custom theme in a text editor. In the appropriate place where your "Edit My Profile" link should appear, add the tags shown below.

    • The contentNode attribute must contain the custom unique name of the 'Edit My Profile' page, i.e., "wps.Selfcare".

    • The compositionNode attribute must contain the new custom unique name you just added via XMLAccess, i.e., "wps.t.Selfcare".


  6. Save and close Default.jsp. Test the new "Edit My Profile" link to confirm that it works as expected.


  7. Note: This procedure will not work in a portlet. You need to use the URL generation services to create links in the portlet to the page or other portlets.

No comments: