Quantcast
Channel: Jive Syndication Feed
Viewing all articles
Browse latest Browse all 9

Use Documents in KM as Portal Help Pages

$
0
0
<p>During your portal implementation, you have many optios to provide help for your end users. You can,</p><ul><li>[customize help link of the Portal in the MastHead | http://help.sap.com/saphelp_nw70/helpdata/en/97/d4ee3d6434445ae10000000a11405a/frameset.htm]</li><li>use "URL to Help Topic" property for your iViews</li></ul><p>Another option, which is the way shown in this blog, creating help documents in a KM folder and developing a small java iView which will generate links dynamically to these documents. For this, simply you need to create a Portal Application Project, create a JSP page in your project and do some coding. After building and deploying your application, you have to create an iView based on your application and put your iView in the Portal Default Framework Page. That's it! Now you have a dynamic help link for your portal.<br/>You have to be familiar to the SAP Netweaver Developer Studio and PDK installed for this task.</p><p> </p><ul><li>h5. Create a Portal Application Project</li></ul><p>Open SAP Netweaver Developer Studio and create a new project. Select Portal Application --> Create a Portal Application Project and give a name (eg. PortalHelpLink).</p><p>!http://img402.imageshack.us/img402/8211/01sh7.jpg|height=154|alt=Portal Application Project|align=middle|width=315|src=http://img402.imageshack.us/img402/8211/01sh7.jpg|border=1!</p><p> </p><ul><li>h5. Create Portal Application Object (JSPDynPage) in your Project</li></ul><p>Right click on your newly created project and select New --> Other --> Portal Application --> Create a new Portal Application Object. In the second step, select the project that you created in previous step. Select JSPDynPage as a template and fill necessary details. Make sure that "Do not generate any bean statements" is selected in the next step.</p><p>!http://img259.imageshack.us/img259/9649/02ei1.jpg|height=149|alt=Portal Application Object|align=middle|width=248|src=http://img259.imageshack.us/img259/9649/02ei1.jpg|border=1!</p><p> </p><ul><li>h5. Do Coding</li></ul><p>Make sure that you are in the Enterprise Portal Perspective and Package Explorer of Netweaver Developer Studio and open the JSP page by going through dist --> PORTAL-INF --> pagelet. Switch to the Source view and put the following code.</p><p> </p><p><%@ page language="java" %><br/><html><br/><head><br/><script language=javascript><br/> EPCM.relaxDocumentDomain();<br/> function navigationEvent( eventObj ) {<br/>  var rootPath = '/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/Public%20Documents/Help/';<br/>  var fileextension = '.txt';<br/>  var page = unescape(eventObj.dataObject.title);<br/>  document.helpForm.helpPath.value = rootPath + page + fileextension;<br/>  document.helpForm.submit();<br/> }<br/> EPCM.subscribeEvent( 'urn:com.sapportals:navigation', 'AddNavTargetAllowDuplicate', navigationEvent );<br/></script><br/></head><br/><form name="helpForm"><br/> <input name="helpPath" type="hidden" value="<%= request.getParameter("helpPath") %>"><br/></form><br/><p style='font-size:8.0pt;font-family:"Arial";text-align:right'><br/>[" target="_blank">Help | <%= request.getParameter(]<br /></html></p><p> </p><p>Save your coding.</p><p> </p><ul><li>h5. Build and Deploy Your Application</li></ul><p>Use menu item Project --> Rebuild Project to compile. Befor deployment, you have to configure your server connection. Right click on your project and select "Quick PAR Upload". Select "Deploy PAR" and deploy your application onto the portal.</p><p>!http://img259.imageshack.us/img259/788/03jr5.jpg|height=160|alt=Deployment|align=middle|width=325|src=http://img259.imageshack.us/img259/788/03jr5.jpg|border=1!</p><p> </p><ul><li>h5. Create an iView Based on Your Application</li></ul><p>Log on to your portal and create a new iView (Content Administration --> Portal Content) based on your newly deployed application. In the first step, you have to select "Portal component" as the Source Type. You will see your project (PortalHelpLink) in the next step. Select your project and go next, here you will see the JSP class name (HelpLink) as the Portal Component. Select the Portal Component and give a name to your iView (eg. Help).</p><p>!http://img252.imageshack.us/img252/2756/355.jpg|height=123|alt=iView Summary|align=middle|width=361|src=http://img252.imageshack.us/img252/2756/355.jpg|border=1!</p><p> </p><ul><li>h5. Edit iView Properties</li></ul><p>Set the +Isolation Method+ to URL.
Set the Show Tray to No.
Set the Fixed Height to 18 pixels.

 

    Edit Default Framework Page of your portal and add newly created iView to it. You can place your iView just below of the Top Level Navigation.
    Navigate to Content Administration --> Portal Content --> Portal Users --> Standard Portal Users. Right click on Default Framework Page and choose Open --> Object.
    Navigate to your iView, right click on it and choose Add iView to Page --> Delta link.
    Swith to page layout, drag Help iView and drop it just below Top Level Navigation.
    Save and close Default Framework Page.

     

      1. h5. Create Folder and Help Documents in KM

      Now, you can start to write your help documents. In our case, we have to create a folder under Public Documents of KM, with the name Help (see coding).
      Go to Content Administration ' KM Content. Open root --> documents --> Public Documents and create Help folder. You have to maintain Permissions to your new folder.
      Select your Help folder and choose Folder --> New --> Text File.
      Create a file with a page name in your portal, in our case "News.txt" for the News page.

      !http://img252.imageshack.us/img252/3239/356.jpg|height=130|alt=Help File in KM|align=middle|width=377|src=http://img252.imageshack.us/img252/3239/356.jpg|border=1!

       

        1. h5. Check The Result

        Refresh your browser. The help link will appear just below of the Top Level Navigation. Make sure that you opened the page that has help file, in our case it is News page. Click on the Help link which is generated in your new iView and check the result.

        !http://img252.imageshack.us/img252/5236/353.jpg|height=147|alt=Navigate to Your Page|align=middle|width=226|src=http://img252.imageshack.us/img252/5236/353.jpg|border=1!...!http://img252.imageshack.us/img252/7364/352.jpg|height=137|alt=Help Link|align=middle|width=202|src=http://img252.imageshack.us/img252/7364/352.jpg|border=1!

        !http://img252.imageshack.us/img252/5117/354.jpg|height=102|alt=Result|align=middle|width=415|src=http://img252.imageshack.us/img252/5117/354.jpg|border=1!

         

          1. h5. Go Beyond

          You can extend your application with new features, and of course share with us.

            You can check this article and embed your link to the MastHead.
              1. You can extend your development with "Business Logic" and check the KM document, if present display the link.
              2. You can add "Configuration" options to your development for the URL and document type (.doc, .pdf, .html etc.) to be generated.
              3. Although, documents displayed according to the page name, you can generate the URL according to the Portal Logon Language and display documents in different languages.
              You can generate URL according to another parameter passed from the event, like eventObj.dataObject.URL (short URL info ) or eventObj.dataObject.pathIndexes (like "0,0,0" for the first page, or "2,1" for the second link of the third place on top level navigation).

                Enjoy the portal!


                Viewing all articles
                Browse latest Browse all 9

                Trending Articles



                <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>