Wednesday, April 25, 2012

How to use WebDAV to develop themes in Portal 7.x

Since last few days, I was involved in working with themes in Portal 7.x specifically PageBuilder2 using WebDAV. Must say lot has changed since older version of Portals like 6 & 6.1. With introduction of WebDAV IBM has taken a great leap in managing static and the dynamic resources of themes & skins. There is enough documentation available over the net regarding usage of WebDAV with portal. This post won't give you any extra stuff rather intention is to group all the relevant details at one location. I would demonstrate how to setup and use WebDAV client to work with themes and gradually will take you through more details of themes and skins. Special thanks to my colleague Devendra Dhoot for his technical support in exploring the architecture of new themes & skins.


First let's understand what's WebDAV and what are the entry points provided to connect with Portal.


WebDAV is Web-based Distributed Authoring and Versioning (WebDAV) - an HTTP extension framework with a plug point for the access and management of hierarchical data. WebDAV stores the data in collections and allows you to work with the data in a user interface view that is similar to that of a file system. Various tools are available for integrating WebDAV resources into the client file system, known as WebDAV clients. To use WebDAV you must first download the WebDAV client or there may be inbuilt depending on the OS you have.


Different WebDAV entry points in websphere portal and WCM are listed below.
  • To access the Portal Themes
        http://:10039/wps/mycontenthandler/dav/themelist
        http://:10039/wps/mycontenthandler/dav/themelist/all
        http://:10039/wps/mycontenthandler/dav/fs-type1/themes

You can also directly access a specific theme by providing its friendly name, unique name, or object ID to the URL above

Note: Some WebDAV clients don't work with /themelist, for them you need them you need to suffix '/all'.  
  • To access the Portal Skins
        http://:10039/wps/mycontenthandler/dav/skinlist
        http://:10039/wps/mycontenthandler/dav/skinlist/all
        http://:10039/wps/mycontenthandler/dav/fs-type1/skins

You can also directly access a specific theme by providing its friendly name, unique name, or object ID to the URL above
  • To access the Static Resources
        http://:10039/wps/mycontenthandler/dav/fs-type1
You can access the 'PageBuilder2' theme and other static resources like layouts,common-resources from here.

  • Entry point to access the Portal Pages
  1. Base portal installation                     http://:10039/wps/mycontenthandler/dav/contentmodel/wps.content.root/
  2. virtual portal
    1. By host name   http://virtual_portal_host_name:port_number/wps/mycontenthandler/dav/contentmodel/wps.content.root
    2. By URL context http://:10039/wps/mycontenthandler/URL_context_of_VP/!ut/p/dav/contentmodel/wps.content.root/

  • Entry point to access WCM libraries    http://:10039/portal_context_root/mycontenthandler/dav/content/libraries/
The WebDAV tree containing your Web content items begins at the WebDAV root /libraries/, which displays all libraries to which you have access. All Web content items within the libraries are organized with folders and files. Folder Structure looks like

libraries
   - wcm.library.my_library
       - authoringTemplates
       - components
       - presentationTemplates
       - sites
       - taxonomies
   - wcm.library.contentlibrary
       - components
       - presentationTemplates
       - sites
       - taxonomies
You can use following available WebDAV clients atleast on Windows.

    WebFolders
    WebFolders are a Windows Explorer extension that allow you to read and open WebDAV resources by using Windows Explorer (file explorer). 

    Bitkinex
    BitKinex integrates the functionality of an innovative FTP, SFTP and WebDAV client for Windows. 

    WebDrive
    WebSphere Portal supports the commercial WebDAV client WebDrive. 

    AnyClient
    WebSphere Portal supports the commercial WebDAV client AnyClient V 2.x. 

I have installed Bitkinex to connect to my WebSphere Portal Server. Here are the steps on how to connect.

Step-1 : Download and setup the Bitkinex as below.

You need to provide portal server host name and the port along with user credentials to connect with portal.

Step-2 : Setup the entry points for WebDAV as shown in the snapshot below.


Step-3 : You can connect to the /themelist/all entry point for theme and view the content.


Step-4 : Connect to the /fs-type1/ entry point to see the static resources.


Step-5 : Connect to the /fs-type1/themes/ and /fs-type1/skins/ entry points to view the static resources for themes & skins.



Step-7 : Now connect to the contentmodel/wps.content.root/ entry point for accessing portal pages. Please keep in mind that you can only change the metadata of page and can not create/delete/move/copy a page.


Step-8 : Connect to the content libraries using content/libraries/ entry point.


Hope this will get you started playing with new theme in WebSphere Portal 7. For more details on WebDAV and how to create theme using it, please find below some useful references.







No comments: