Site default URL in Liferay with Velocity

3.1k views Asked by At

I'm using Liferay 6.2 and I would like to get the default site URL using Velocity.

Thanks.

2

There are 2 answers

1
Pawel Kruszewski On

Try if $themeDisplay.getURLHome() cuts it.

UPDATE: $site_default_url

See example in Liferay's unstyle theme: https://github.com/liferay/liferay-portal/blob/a1329911eab1430b2fba1d2dbf09843aab6c2bb6/portal-web/docroot/html/themes/_unstyled/templates/portal_normal.vm#L29

0
ASR On

Try this one $themeDisplay.getPortalURL()