Skip to main content

developerWorks >  Lotus  >  Forums  >  Lotus Web Content Management  >  developerWorks

How to generate the URL to point to a Menu component    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 4 - Pages: 1 - Last Post: Nov 6, 2009 8:13 AM Last Post By: cmknight
Lessly

Posts: 5
Registered: Feb 07, 2007 08:31:56 AM
How to generate the URL to point to a Menu component
Posted: Oct 20, 2009 11:52:03 PM
 
Click to report abuse...   Click to reply to this thread Reply
Team,

I have a requirement to show a list of hyperlinks in Presentation Template which will load the News Menu component using ajax function.


Example:

<!--
<a href="#" onclick="ajaxFunction([url to Jan 09 Menu Component]);">Jan 09 News</a>
<a href="#" onclick="ajaxFunction([url to Feb 09 Menu Component]);">Feb 09 News</a>
<a href="#" onclick="ajaxFunction([url to Mar 09 Menu Component]);">Mar 09 News</a>
-->

Please help me to achive this.

Note: I have more month wise and archived news menu components to be called using the same approach.

Regards,
Lessly Johnson

Dick_Larsson

Posts: 10
Registered: May 14, 2007 04:42:19 AM
Re: How to generate the URL to point to a Menu component
Posted: Oct 21, 2009 09:17:23 AM   in response to: Lessly in response to: Lessly's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi

This can easily be done.
The syntax for a direct URL to a Library Component is:
http://HOST:PORT/wps/wcm/connect/PATH
?srv=cmpnt&source=library&cmpntname=componentname

Example: http://host:10038/wps/wcm/connect/site/sitearea/content?srv=cmpnt&source=library&cmpntname=component

You can read more about this here:
http://www-10.lotus.com/ldd/portalwiki.nsf/dx/WCM-6.1-A-7.0-Delivering-content

One more thing, you can configure your Menu Components to react to QueryString/URL parameters too if you want more dynamic behavior.

Best regards
Dick Larsson - Stockholm/Sweden/www.ekakan.com
Lessly

Posts: 5
Registered: Feb 07, 2007 08:31:56 AM
Re: How to generate the URL to point to a Menu component
Posted: Nov 05, 2009 11:08:00 PM   in response to: Lessly in response to: Lessly's post
 
Click to report abuse...   Click to reply to this thread Reply
Thanks for your input.

Can you give me more details on the Query string parameters for the Menu component
to achive dynamic behaviour.

For example,
Want to display menu which can fetches content published between 01-May-2009 and 30-May-2009.

Please help me to solve this.

Regards,
Lessly Johnson
Dick_Larsson

Posts: 10
Registered: May 14, 2007 04:42:19 AM
Re: How to generate the URL to point to a Menu component
Posted: Nov 06, 2009 08:01:27 AM   in response to: Lessly in response to: Lessly's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Lessly

You can find more information about Menu elements/components here

http://publib.boulder.ibm.com/infocenter/wcmdoc/v6r0/index.jsp?topic=/com.ibm.lotus.wcm.doc/wcm/wcm_dev_elements_menu_search.html

But was this the answer for your original question? In that case please set the status of this question to "answered"..
;)

Personally I would not directly address Menu elements, I would address a JSP component which renders a Menu component server side and extracts only the relevant parts based on query parameters

Best regards
/Dick Larsson
IBM WebSphere Portal/WCM developer at www.ekakan.com/Stockholm/Sweden
cmknight

Posts: 448
Registered: Aug 21, 2005 08:51:58 PM
Re: How to generate the URL to point to a Menu component
Posted: Nov 06, 2009 08:13:59 AM   in response to: Lessly in response to: Lessly's post
 
Click to report abuse...   Click to reply to this thread Reply
Also, although you cannot use menus to return content within a date range like that (unless you tag content with categories which correspond to the month they represent, which is possible), you can use PZN component to fire PZN rule that uses date range like that to return content.

Christopher Knight

Point your RSS reader here for a feed of the latest messages in all forums