Fórum

how to get dynamic private page url in navigation.vm file

Aruna Inamdar, modificado 10 Anos atrás.

how to get dynamic private page url in navigation.vm file

New Member Postagens: 16 Data de Entrada: 06/08/13 Postagens Recentes
Hi,
I am modifying the navigation.vm file to provide link to private page url .
I am looking for code which will display the link to private page url.
can anyone provide me some pointers ? I used below code it is not working.
#foreach($site in $user.mySites)
#if($site.isUserPersonalSite())
<li class="$nav_item_css_class" id="myNavItem" $nav_item_attr_selected role="presentation">
<a href="/group${$site.friendlyURL}"> role="menuitem">
<span>My Dashboard</span>
</a>
</li>

Thanks for your time.
thumbnail
Apoorva Prakash, modificado 10 Anos atrás.

RE: how to get dynamic private page url in navigation.vm file

Liferay Master Postagens: 658 Data de Entrada: 15/06/10 Postagens Recentes
Aruna Inamdar:
Hi,
I am modifying the navigation.vm file to provide link to private page url .
I am looking for code which will display the link to private page url.
can anyone provide me some pointers ? I used below code it is not working.
#foreach($site in $user.mySites)
#if($site.isUserPersonalSite())
<li class="$nav_item_css_class" id="myNavItem" $nav_item_attr_selected role="presentation">
<a href="/group${$site.friendlyURL}"> role="menuitem">
<span>My Dashboard</span>
</a>
</li>

Thanks for your time.


Try the following:
/user${$site.friendlyURL}


HTH
Aruna Inamdar, modificado 10 Anos atrás.

RE: how to get dynamic private page url in navigation.vm file

New Member Postagens: 16 Data de Entrada: 06/08/13 Postagens Recentes
Hi,

Thanks for the reply.
I tried with "/user${$site.friendlyURL}" but did not got the result.
thumbnail
Apoorva Prakash, modificado 10 Anos atrás.

RE: how to get dynamic private page url in navigation.vm file

Liferay Master Postagens: 658 Data de Entrada: 15/06/10 Postagens Recentes
Aruna Inamdar:
Hi,

Thanks for the reply.
I tried with "/user${$site.friendlyURL}" but did not got the result.


Hi Aruna,

I'm still not clear what you want to achieve.

If you want to create user's private page link in velocity, following will work:
  • /user$user.getGroup().getFriendlyURL()
  • /group$user.getGroup().getFriendlyURL()

HTH.
Aruna Inamdar, modificado 10 Anos atrás.

RE: how to get dynamic private page url in navigation.vm file

New Member Postagens: 16 Data de Entrada: 06/08/13 Postagens Recentes
Hi Apoorva,

Yes, I am creating user's private page link in velocity. So that when any user login into his/her site, along with all the user site pages,I want to display user link to user's private page as well in the navigation.

ex: SiteA has 2 pages Page1 and Page2.
I have a hook program which will redirect to user after login to SiteA

Now when user is redirected to SiteA, then he should be able to see link to all the site pages plus user private pages.

Thanks so much for the details provided below.

When I used "/user$user.getGroup().getFriendlyURL()" , I got the result.

Thanks,
Aruna
thumbnail
Apoorva Prakash, modificado 10 Anos atrás.

RE: how to get dynamic private page url in navigation.vm file

Liferay Master Postagens: 658 Data de Entrada: 15/06/10 Postagens Recentes
Aruna Inamdar:
Hi Apoorva,

Yes, I am creating user's private page link in velocity. So that when any user login into his/her site, along with all the user site pages,I want to display user link to user's private page as well in the navigation.

ex: SiteA has 2 pages Page1 and Page2.
I have a hook program which will redirect to user after login to SiteA

Now when user is redirected to SiteA, then he should be able to see link to all the site pages plus user private pages.

Thanks so much for the details provided below.

When I used "/user$user.getGroup().getFriendlyURL()" , I got the result.

Thanks,
Aruna


Welcome Aruna... emoticon