Fórum

How to create Default pages for User?

thumbnail
Vipin Menon, modificado 14 Anos atrás.

How to create Default pages for User?

Junior Member Postagens: 75 Data de Entrada: 12/09/07 Postagens Recentes
Hi,

Problem statement - As soon a new user gets created a new pages should be created for him \ her. These pages should contain portlets as present in friends page of My community in Liferay.com.

Question - Can this be achieved using some changes in configuration or Customization needs to be performed for the same? Any pointer should be helpful.

Thanks.

With Regards,
vipin
thumbnail
Dhrutika parekh, modificado 14 Anos atrás.

RE: How to create Default pages for User?

Expert Postagens: 435 Data de Entrada: 09/02/09 Postagens Recentes
Hi ,

Use this code in init_custom.vm

This file allows you to override and define new velocity variables.
#if ($user_group && $user_group.getPublicLayoutsPageCount()>0 )
#set ($myCommunityPublicURL = "/web/$user.getScreenName()/home")
#end

#if ($user_group && $user_group.getPrivateLayoutsPageCount()>0)
#set ($myCommunityPrivateURL = "/user/$user.getScreenName()/home" )
#end


And to add it in dock put this code to dock.vm

<li align="center">
#if ($myCommunityPrivateURL)
<a href="$myCommunityPrivateURL" style="text-decoration: none" >&nbsp;&nbsp; My Webpage &nbsp;&nbsp;</a>
#end
</li>



<li align="center">
#if ($myCommunityPublicURL)
<a href="$myCommunityPublicURL" style="text-decoration: none" > &nbsp; Public Webpage &nbsp;</a>
#end
</li>


Hope it helps!!!


Thanks,
Dhrutika Parekh

Cignex Technologies Pvt Ltd
thumbnail
Dhrutika parekh, modificado 14 Anos atrás.

RE: How to create Default pages for User?

Expert Postagens: 435 Data de Entrada: 09/02/09 Postagens Recentes
Hi,

And to set default portlets you can set in portal-ext.propeties

default.user.private.layout.column-1=20,121,8 .//here you can specify the portlet id's that u want by default to be displayed on private page
default.user.private.layout.column-2=contacts
default.user.private.layout.column-3=
default.user.private.layout.column-4=


#
# Set the portlet ids for the columns specified in the layout template.
#
default.user.public.layout.column-1=100,6_WAR_wolportlet,4_WAR_wolportlet,1_WAR_wolportlet,1_WAR_analogclockportlet
default.user.public.layout.column-2=5_WAR_wolportlet,36,33,20
default.user.public.layout.column-3=
default.user.public.layout.column-4=
thumbnail
Vipin Menon, modificado 14 Anos atrás.

RE: How to create Default pages for User?

Junior Member Postagens: 75 Data de Entrada: 12/09/07 Postagens Recentes
Dhrutika, jeffery - thanks for the response. By the time i saw your post I was able to locate the mechanism from Admin guide.

Now a new question is there -

1. What if i need to add 2 pages by default? I made out that i can do that with the help of LAR but not sure how to export one? I tried exporting LAR file from Manage pages but got this error in Tomcat console
13:07:26,600 ERROR [PortletRequestProcessor:379] Invalid path was requested /enterprise_admin_users/export_pages


Please advice how could I export a LAR file? and is there any mechanism through the configuration mentioned by you to create 2 pages?

2. How you got to know the portlet id's?

Thanks - Vipin
thumbnail
Lisa Simpson, modificado 14 Anos atrás.

RE: How to create Default pages for User?

Liferay Legend Postagens: 2034 Data de Entrada: 05/03/09 Postagens Recentes
Export and Import from the Control Panel and not the pages themselves. We've had much better luck with that.
thumbnail
Jeffrey Handa, modificado 14 Anos atrás.

RE: How to create Default pages for User?

Liferay Master Postagens: 541 Data de Entrada: 01/12/08 Postagens Recentes
Hi Vipin,

Search the portal properties file for

Default User Public Layouts

There are several options that can be used to customize the default user pages.