Navigation inheriatance

Hi All, need urgent help.

For our project we are setting up multiple country communities in one instance. Eg. UK, US, JP.

so sample URLs are:

community.my.com/uk
community.my.com/us
community.my.com/jp

All three countries need to have their own unique navigation links.

I wanted to setup navigation /uk and lock it so it inherits in all inside pages (including group and site pages). same for /us and /jp.

But now we realised that to inherit this navigation on site pages as well, we must add navigation on root level and lock it. But it can be only one navigation widget.

This does not meet our multi-country multi-navigation requirement.

Please suggest how i can solve this?

Thanks,
Kalim

Parents
  • To solve this, you'll likely need to create a customized version of the navigation widget that defines separate navigation options for each country and selects the appropriate country's navigation items based on the URL being rendered (the top-level group in the URL).

  • hi , thanks for your answer/help.

    We did follow the similar approach. We added multiple custom navs with country field. 

    used grouppath to identify current cournty and apllied the same country navigation.

    This is good untll we have grouppath. But on site pages (profile, search etc), we had difficulties again as there was no group path. We used cookie here. When group path was available we dropped a cookie to remember user's country. and when we lose group path, we wrote fallback logic to use cookie country.

    #set ($cookieKey = "communityCountryCode")
    #set($CookieExpiry = 1825 * 1000 * 60 * 60 * 24)
    $core_v2_page.SetCookieValue($cookieKey, “US”, "%{ CookieName = $cookieKey, expires= $CookieExpiry }")

    but the problem here is its not seeting expiry as per our definition. Its session based cookie.

    If user revisits, we are not able to remember the country.

    Is there a way to set expiry for the cookie using above velocity code?

    thanks in advance,

    Kalim

    , fyi

  • There is not currently a way to set the expiration date of a cookie through the scripting API. 

    As a potential alternate solution, could you inspect the user's language key? $core_v2_user.Accessing.Language

Reply Children