Forums de discussion

Link to Private Page

Kushal Shah, modifié il y a 11 années.

Link to Private Page

New Member Publications: 3 Date d'inscription: 14/03/13 Publications récentes
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, modifié il y a 11 années.

RE: Link to Private Page

Liferay Master Publications: 875 Date d'inscription: 07/01/11 Publications récentes
Some thing like this ?

<a class="myhome" href="/user/$user.getScreenName()/home">My Home</a>
Kushal Shah, modifié il y a 11 années.

RE: Link to Private Page

New Member Publications: 3 Date d'inscription: 14/03/13 Publications récentes
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, modifié il y a 11 années.

RE: Link to Private Page

Expert Publications: 427 Date d'inscription: 12/08/09 Publications récentes
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, modifié il y a 11 années.

RE: Link to Private Page

New Member Publications: 3 Date d'inscription: 14/03/13 Publications récentes
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, modifié il y a 11 années.

RE: Link to Private Page

Expert Publications: 427 Date d'inscription: 12/08/09 Publications récentes
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