Journal Templates and VM variables

来源:互联网 发布:乾隆王朝 知乎 编辑:程序博客网 时间:2024/06/07 13:54

参考:

 

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Journal+Template+(Velocity)

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Journal+Internal+API

 

 

 

在Class :com.liferay.portlet.journal.util.JournalUtil 中定义的。 Here you go.... these are available in content when used in the format:

@variable@

example:

@theme_image_path@/mybigawesome_banner.jpg


tokens.put("company_id", String.valueOf(themeDisplay.getCompanyId()));
tokens.put("group_id", String.valueOf(groupId));
tokens.put("cms_url", themeDisplay.getPathContext() + "/cms/servlet");
tokens.put("image_path", themeDisplay.getPathImage());
tokens.put(
"friendly_url_private_group",
themeDisplay.getPathFriendlyURLPrivateGroup());
tokens.put(
"friendly_url_private_user",
themeDisplay.getPathFriendlyURLPrivateUser());
tokens.put(
"friendly_url_public", themeDisplay.getPathFriendlyURLPublic());
tokens.put("main_path", themeDisplay.getPathMain());
tokens.put("portal_ctx", themeDisplay.getPathContext());
tokens.put(
"portal_url", Http.removeProtocol(themeDisplay.getURLPortal()));
tokens.put("root_path", themeDisplay.getPathContext());
tokens.put("theme_image_path", themeDisplay.getPathThemeImages());
tokens.put("theme_root_path", themeDisplay.getPathThemeRoot());

原创粉丝点击