Liferay 6 - 如何将自定义布局设置为默认?
我正在开发一个 Liferay 6 项目,该项目的一部分是创建一个新的布局模板,作为整个站点的默认模板。 Liferay 自己的 wiki 上关于布局模板的文档非常稀疏,而且我在 Google 搜索甚至这里的 SO 上都没有更好的运气。
我确实找到了一篇文章( Liferay - 每个页面的布局),它回答了问题,但似乎这可能有点过分了。在该问题中,目标是根据页面更改模板,因此答案是创建一个 Hook 并使用它根据需要动态设置模板。在这里,我只想让这个自定义模板始终成为所有页面的默认模板,这就是为什么我认为其他问题的答案可能比真正需要的更多。
如果有人知道这个谜题的答案,请告诉我。谢谢!
——JLM——
I'm working on a Liferay 6 project, and part of the project is to create a new layout template to be used for the entire site as the default. Liferay's own wiki is very sparse on documentation about layout templates, and I haven't had better luck with Google searches or even here on SO.
I did find one article ( Liferay - Layout for each pages ) that sort of answers the question, but it seems like it might be overkill. In that question, the goal was to change the template based on the page, so the answer was to create a Hook and use that to set the template on the fly as needed. Here, I just want to have this custom template be the default for all pages, all the time, which is why I think the answer to that other question might be more than is really needed.
If anyone has the answer to this puzzler, please let me know. Thanks!
-- JLM --
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我已经弄清楚了我的困惑。 Liferay 有两种类型的布局模板——属于主题(Liferay 项目的一种类型)的模板,以及实际的布局模板项目本身。
幸运的是,这实际上使回答我的问题变得非常容易,至少在我需要的上下文中是这样。根据 Liferay 的文档 http:// /www.liferay.com/community/wiki/-/wiki/Main/How+To+Change+Liferay+Default+Theme :
我希望这会有所帮助其他一些人试图解决这个问题!
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.
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 :
I hope this helps some other people trying to figure this out!