且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Liferay 6-如何将自定义布局设置为默认设置?

更新时间:2022-01-28 21:45:45

好的,我已经弄清楚了我的困惑. Liferay有两种类型的布局模板-属于 theme (属于Liferay项目的一种)的模板,以及实际的布局模板项目本身.

OK, I've figured out my confusion. Liferay has two types of layout templates -- templates that are part of a theme, which is one type of Liferay project, as well as actual layout template projects themselves.

  • 您可以在主题中的模板上设置网站的整体页面布局.名为portal_normal.vm的主页模板是一个完整的网页,其中包含< html>标签,一个< head>和< body>等.主题中的其他模板通常是页面片段.
  • 另一方面,
  • 布局模板仅用于 ,用于在页面的主要内容区域(由主题模板文件中的标签定义)中布局portlet.它总是一个片段,并且只能具有< div>元素或< table>布置portlet.
  • The templates in a theme are where you set up the overall page layout for the site. The main page template, named portal_normal.vm, is a full web page with an <html> tag, a <head> and <body>, etc. Other templates in the theme are usually page fragments.
  • A Layout Template, on the other hand, is only for laying out the portlets in the main content region of your page (which is defined by tags in your Theme's template files). It is always a fragment and can only have <div> elements or a <table> for laying out the portlets.

幸运的是,这实际上使回答我的问题非常容易,至少在我需要的情况下.根据Liferay的文档,位于 http://www.liferay.com/community/wiki/-/wiki/Main/How+To+Change+Liferay+Default+Theme :

Fortunately, this actually makes answering my question very easy, at least in the context that I needed. Per Liferay's documentation at http://www.liferay.com/community/wiki/-/wiki/Main/How+To+Change+Liferay+Default+Theme :

注意:从6.x开始,您不能仅使用liferay-look-and-feel.xml中指定的主题ID.而是转到控制面板"->插件配置"->单击感兴趣的主题->记下插件ID并使用该ID [作为portal-ext.properties中的default.theme.id的值]

Note: As of 6.x, you cannot just use the theme id specified in the liferay-look-and-feel.xml. Instead, go to Control Panel->Plugins Configuration->Click on theme of interest->note the Plugin ID and use that [as the value for default.theme.id in portal-ext.properties]

我希望这可以帮助其他尝试解决这个问题的人!

I hope this helps some other people trying to figure this out!