Foros de discusión

Link to Private Page

Kushal Shah, modificado hace 11 años.

Link to Private Page

New Member Mensajes: 3 Fecha de incorporación: 14/03/13 Mensajes recientes
I have created 1 site in liferay and also there is one page in it, When any user sign in and clicks on that page I want to show private page of that particular user.. Can any one help me?? Thanks in advance..
thumbnail
Jitendra Rajput, modificado hace 11 años.

RE: Link to Private Page

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Some thing like this ?

<a class="myhome" href="/user/$user.getScreenName()/home">My Home</a>
Kushal Shah, modificado hace 11 años.

RE: Link to Private Page

New Member Mensajes: 3 Fecha de incorporación: 14/03/13 Mensajes recientes
Hey, Jitendra thanks for replying emoticon Actually I am new in liferay, So can you tell me where to put this code?

I want to show all the portlets and settings which user did in his/her private page in to the welcome page of my site.
thumbnail
Anil Sunkari, modificado hace 11 años.

RE: Link to Private Page

Expert Mensajes: 427 Fecha de incorporación: 12/08/09 Mensajes recientes
Hi Kushal,

Actually the page which you created will be generated from navigation.vm. For reference you can cross check the current applied theme(classic) under the following location irrespective of server.


\...\ROOT.war\html\themes\classic\templates

and Code will somehow looks like the below and you have to restrict the line

<a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.icon() $nav_item.getName()</span></a> with your rescpective page name/friendly url to perform whatever jitendra says.

<nav class="$nav_css_class" id="navigation">
<h1>
<span>#language("navigation")</span>
</h1>

<ul>
#foreach ($nav_item in $nav_items)
#if ($nav_item.isSelected())
<li class="selected">
#else
<li>
#end
<a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.icon() $nav_item.getName()</span></a>

#if ($nav_item.hasChildren())
<ul class="child-menu">
#foreach ($nav_child in $nav_item.getChildren())
#if ($nav_child.isSelected())
<li class="selected">
#else
<li>
#end
<a href="$nav_child.getURL()" $nav_child.getTarget()>$nav_child.getName()</a>
</li>
#end
</ul>
#end
</li>
#end
</ul>
</nav>



Hope it surely helps you!!!

Regards,
Anil Sunkari
Kushal Shah, modificado hace 11 años.

RE: Link to Private Page

New Member Mensajes: 3 Fecha de incorporación: 14/03/13 Mensajes recientes
Hey thank you Anil it works, But I want only content of User's private page to be displayed on my site's welcome page. Can you tell me how to do that??
thumbnail
Anil Sunkari, modificado hace 11 años.

RE: Link to Private Page

Expert Mensajes: 427 Fecha de incorporación: 12/08/09 Mensajes recientes
HI Kushal,


For this you have to refer layout_ table for reference which stores portlets/layouts information.So that if will fetch while page renders.For you it will be having in user respective page records in layout_ entry....

Regards,
Anil Sunkari