Project WebSynergy Milestone 4 Administration Guide

Sharing a Portlet With Other Websites

Consider the example of sharing the Calendar portlet on a website created by you. The following is the scenario involved:

  1. Click on the Configuration button among the edit controls for a portlet.

  2. Click on the Sharing tab.

    Any Website, Facebook and Friends are the three tabs within the Sharing tab.

  3. Copy the code in the Any Website tab.

  4. Select the Allow users to add <portlet> to any website option and click Save.

  5. Paste the copied code into the html source of any website and save the page. The portlet is added to the website.

ProcedureTo Share a Portlet With Other Websites

  1. Login to Project WebSynergy as any user of your choice.

    In this example, login as Paul Tester.

  2. Click on the Configuration button among the edit controls for the portlet.

    In this example, click on the Configuration button among the edit controls for the Calendar portlet.

  3. Click on the Sharing tab.

    Figure 7–34 The code for sharing the portlet on any website

    The code for sharing the portlet on any website

  4. Copy the code for sharing the portlet on any website.

  5. Select the Allow users to add Calendar to any website option.

  6. Click Save.

  7. Open the source code of any website and copy the sharing code into it, and save changes to add the portlet to the website.

    As a simple example for this, do the following:

    1. Open the Mozilla Classic browser

    2. Click Edit Page from the file menu.

    3. Click on HTML Source.

    4. Paste the copied sharing code into the page.

      Figure 7–35 Adding the sharing code to the source code of a website

      Adding the sharing code to the source code of a website

    5. Click Save.

    6. A dialog box requesting for a page title appears. Type a title and click OK, and save the page your desktop.

      In this example, we are naming the page as Calendar Sharing.

    7. Open the page in a web browser. You can notice that the Calendar portlet is added to the page.

      Figure 7–36 The portlet added to the website

      The portlet added to the website