Skip to Content
avatar image
Former Member

Generate links for portal pages.

Experts,

I am trying to develop a portal page, which will contain links to all other pages in the portal.

Ideally when a user clicks on one of the link, the correct page/tab should open up in the portal.

My problem is how to generate the links for existing pages in the portal.

Has anybody done a similar thing?

Help greatly appreciated

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 27, 2004 at 07:19 AM

    Hi Philip,

    did you try this with NavigationTargat=...

    =>

    The regular URL for launching the portal is http://portalserver/irj. To implement URL navigation:

    ...

    1. From the Portal Catalog, select the page with which you want to launch the portal.

    2. From the Quick Info pane below the Portal Catalog, copy the name (PCD URL value) of the page and save in a text editor, replacing the string PCD with ROLES://.

    3. Open your browser and to the default portal URL, add the following string:

    /index.html?NavigationTarget=<value saved in text editor>

    4. Save the new URL, which you can then use to launch your portal.

    (http://help.sap.com/saphelp_ep60sp2/helpdata/en/2d/91e33edd37de63e10000000a11405a/frameset.htm)

    Hope this helps,

    Holger.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2004 at 10:18 AM

    Hi Philip,

    If you are using EP6 SP2, then you can consult the Documentation under Java Development role tab. Therein, SAP has provided a similar example, with the necessary logic too!

    Regards,

    Sagar.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You can create an Abstract Portal Component

      public class myProgram extends AbstractPortalComponent{

      public void doContent(

      IPortalComponentRequest request, IPortalComponentResponse response)

      {

      IPortalComponentContext myContext = request.getComponentContext();

      IPortalComponentProfile myProfile = myContext.getProfile();

      // property name="targetOne" value="ROLES://portal_content/roleName/myWorksetOne/myPageOne"/>

      String strTargetOne = myProfile.getProperty("targetOne");

      //property name="targetTwo" //value="ROLES://portal_content/roleName/myWorksetTwo/myPageTwo"/>

      String strTargetTwo = myProfile.getProperty("targetTwo");

      IPageContext myPageContext =PageContextFactory.createPageContext(request, response);

      Form myForm = myPageContext.createFormDocument("myForm");

      String linkone = "Link one Name";

      String linktwo = "Link two Name";

      String navtargetOne =

      "<div id=\"smi\"><A HREF=\""

      + linkOne

      + "\" onclick=\"return P arent.EPCM.doNavigate('"

      + strTargetOne

      + "',"

      + 0

      + ",null,null);\">"

      + linkone

      + "</A></div>";

      String navtargetTwo =

      "<div id=\"smi\"><A HREF=\""

      + linkTwo

      + "\" onclick=\"return parent.EPCM.doNavigate('"

      + strTargetTwo

      + "',"

      + 0

      + ",null,null);\">"

      + linktwo

      + "</A></div><table border=0 cellspacing=0 cellpadding=0><tr><td height='3px'></td></tr></table>";

      ItemList iteml = new ItemList();

      iteml.setOrdered(false);

      iteml.addRawText(navtargetOne);

      iteml.addRawText(navtargetTwo);

      myForm.addComponent(iteml);

      response.write("<table><tr><td width='2px'></td><td>");

      myPageContext.render();

      response.write("</td></tr></table>");

      }

      }