Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Whats the difference?
Achmed Tyrannus Albab, modified 5 Years ago.
Regular Member
Posts: 158
Join Date: 3/5/10
Recent Posts
Hi,
May i know whats the difference of these variables :
${site_default_public_url}
${community_default_public_url}
${site_default_url}
${community_default_url}
In the sense when to use which?
Because i tried outputting it on my theme, and all 4 outputs the same URL.
Thanks.
May i know whats the difference of these variables :
${site_default_public_url}
${community_default_public_url}
${site_default_url}
${community_default_url}
In the sense when to use which?
Because i tried outputting it on my theme, and all 4 outputs the same URL.
Thanks.
I would set the theme on your private pages and check the difference, I think you'll see one there.
The community ones I'm not sure about, they might be holdover variable names from previous portal versions.
The community ones I'm not sure about, they might be holdover variable names from previous portal versions.
Achmed Tyrannus Albab, modified 5 Years ago.
Regular Member
Posts: 158
Join Date: 3/5/10
Recent Posts
Thanks David, will give it a try later. I dont use private pages much.
You could check the init.ftl (you can find it in the build/templates folder after you build your theme war). It contains the definitions of those variables.
...
site_default_public_url = htmlUtil.escape(page_group.getDisplayURL(theme_display, false))
community_default_public_url = site_default_public_url
site_default_private_url = htmlUtil.escape(page_group.getDisplayURL(theme_display, true))
community_default_private_url = site_default_private_url
site_default_url = site_default_public_url
community_default_url = site_default_url
/>
<#if layout.isPrivateLayout()>
<#assign
site_default_url = site_default_private_url
community_default_url = site_default_url
/>
<!--#if-->
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™