Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
venkatesh vemula
show home URL of organization or community
October 29, 2012 11:04 PM
Answer

venkatesh vemula

Rank: New Member

Posts: 16

Join Date: August 1, 2012

Recent Posts

Hi All,

can anyone tell me how to get Home page URL of Organization or Community dynamically.


Thank you.
Bart Simpson
RE: show home URL of organization or community
October 30, 2012 12:00 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 522

Join Date: August 29, 2011

Recent Posts

where do you want to get this url , in theme or in jsp / class?
PortalUtil has a method:
1String com.liferay.portal.util.PortalUtil.getHomeURL(HttpServletRequest request) throws PortalException, SystemException

In theme the variable should be available :
1$home_url

reference : http://www.liferay.com/community/wiki/-/wiki/Main/Access+Objects+from+Velocity