IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this community and its apps will no longer be available. More details available on our FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2019-05-13T04:22:19Z by D7GM_Venkatesh_Perumal
sgdeveloper15
sgdeveloper15
27 Posts

Pinned topic Setting RequestAttribute in Navigator to set Site Area in Menu Component

‏2019-04-24T14:19:45Z | 8.5 component menu navigator wcm wcm8.5

I am attempting to set a RequestAttribute in a navigator component with the path of the site area and then pass the site area into a menu component dynamically.

[Plugin:RequestAttribute key="siteAreaName" mode="set" value="{Site Area Path}"]

 

I am able to retrieve this value in my menu component by using
[Plugin:RequestAttribute key="siteAreaName"]

 

Under my Menu component I am setting the location to look for "siteAreaName" in the Query Parameter.

 

I have read that setting the RequestAttribute exposes that value in the query string parameter, I am right in thinking this is possible?  The only other options seems to be writing a custom JSP to set an actual query string parameter.  We would like to be able to send the site area from the navigator to the menu without having to write a custom JSP.

I know that I will have to pass the entire site area path into the menu component but what would that format look like?  Currently I am trying to pass Portal Site/Content Root/Home/etc....

Thanks

  • D7GM_Venkatesh_Perumal
    54 Posts

    Re: Setting RequestAttribute in Navigator to set Site Area in Menu Component

    ‏2019-04-26T03:02:29Z  

    Hi, It should start from the Content Library name e.g., <library-name>/<site-area-01>/<site-area-02>/<site-area-03>

  • sgdeveloper15
    sgdeveloper15
    27 Posts

    Re: Setting RequestAttribute in Navigator to set Site Area in Menu Component

    ‏2019-04-26T10:45:03Z  

    Hi, It should start from the Content Library name e.g., <library-name>/<site-area-01>/<site-area-02>/<site-area-03>

    Is the RequestAttribute accessible by the Query String option in the menu component?  We are able to set the RequestAttribute but the only option for a dynamic location in the menu component is the Query String option.  We are not actually setting a query string parameter so I am curious if this RequestAttribute is accessible there.  I had read that in WCM 8.5 the RequestAttribute is accessible from the query string option but nothing we have passed has worked.

     

    We are trying to pass Portal Site/Content Root/Home/etc.....

     

    This is the entire location path to the site area.

  • D7GM_Venkatesh_Perumal
    54 Posts

    Re: Setting RequestAttribute in Navigator to set Site Area in Menu Component

    ‏2019-05-13T04:22:19Z  

    Is the RequestAttribute accessible by the Query String option in the menu component?  We are able to set the RequestAttribute but the only option for a dynamic location in the menu component is the Query String option.  We are not actually setting a query string parameter so I am curious if this RequestAttribute is accessible there.  I had read that in WCM 8.5 the RequestAttribute is accessible from the query string option but nothing we have passed has worked.

     

    We are trying to pass Portal Site/Content Root/Home/etc.....

     

    This is the entire location path to the site area.

    Yes, the request attribute values are accessible in the MENU component.  You can try setting the request attributes on the Presentation template.