从前端角度看LIferay?

发布于 2024-11-16 13:55:01 字数 192 浏览 2 评论 0原文

我的背景是一名网站设计师,使用 Drupal 制作网站并负责前端。在我的新工作中,我只是做前端,我的老板要求我从“前端角度”研究liferay(这里的大多数人都是java开发人员)。

那么,liferay 的主题化程度如何?您可以(轻松)控制输出的确切 html 吗?

我知道这是一个开放式问题,但我不太确定如何更具体...... 谢谢

My background is as a website designer, making sites with Drupal and also doing the frontend. With my new job im just doing the frontend, and ive been asked by my boss to look into liferay (most people here are java developers), from a 'frontend perspective'.

So, how themable is liferay? Do you have (easy) control over the exact html outputted?

Bit of an open ended question I know but im not really sure how to be more specific....
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁年轻赶紧闹 2024-11-23 13:55:01

你没有太多的控制权,因为 LR html 页面很大。它是门户页面和特定 portlet 的 html 部分的组合。一个页面上可以有 3 - 10 个,你可以在巨大的门户页面中对它们进行样式设置...这就是为什么 CSS 层次结构相当复杂,你应该对 CSS 有一点熟练,才能在这样的环境中感到舒适,此外,即使您关闭 tomcat 和属性文件上的缓存,有时您也必须手动清空浏览器缓存才能正确重新加载页面。

但我必须说,LR UX 开发人员是我所认识的最优秀的开发人员,而且做得非常专业。很高兴与它合作。

有 4 个要点:

  1. 与 java 开发人员合作相对容易进入。因为您必须学习如何在 Web 服务器 (tomcat) 上设置它 - 最简单的方法是安装捆绑包并运行它。但你还需要查看LR的源代码,看看themes (登录访客,密码为空)并进行一些逆向工程。主题被部署(通过 Ant)到 LR 的运行实例中。即使没有任何 Java 开发人员的帮助,这也是相对可行的。在主题目录中运行“$ant create”后,它会在您创建主题并部署它们时构建一个模板主题。但是在文件系统上的 PATH 方面必须有一些特定于 Ant 的设置。

  2. 主题开发很简单,您只需创建经典 LR 主题的 _diff - 修改已经完成的主题。目的是,LR javascript & CSS 框架和 CSS 层次结构相当复杂,这是最好的方法。

  3. tomcat/webapps/ROOT/WEB-INF/classes/中创建portal-ext.properties,添加此行include-and-override=portal-developer-ext.properties< /code> 并在与此内容相同的位置创建portal-developer-ext.properties,这使得UI开发JS&amp; CSS 更加友好。

    主题.css.fast.load=false

    主题.images.fast.load=false

    javascript.fast.load=false

    javascript.log.enabled=false

    com.liferay.portal.servlet.filters.strip.StripFilter=false

    com.liferay.portal.servlet.filters.minifier.MinifierFilter=false

    layout.template.cache.enabled=false

    combo.check.timestamp=true

    freemarker.engine.cache.storage=soft:1

    freemarker.engine.modification.check.interval=0

    openoffice.cache.enabled=false

    velocity.engine.resource.manager.cache.enabled=false

    com.liferay.portal.servlet.filters.cache.CacheFilter=false

    com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true

  4. 此外,还有构建在 YUI CSS 和 Web 之上的合金框架。 为您提供了大量的“小部件”和插件供您使用。

简而言之,这是一件非常有趣的事情,一个人可以学到很多东西,但必须愿意花一些时间来投入其中。

You don't have much control, because LR html pages are huge. it is a composition of Portal page and html sections of particular portlets. It can be 3 - 10 of them on a page, and you style them all within the huge portal Page ... That's why there is quite complicated CSS hierarchy and you should be a little skilled in CSS to feel comfortable in such an environment, also even if you turn off caching on tomcat and property file, sometimes you have to manually empty browser cache to reload the page properly.

But I must say that LR UX developers are the best I know and it's all very professionally done. Pleasure to work with it.

There are 4 important points :

  1. It's relatively easy to get into it with cooperation with a java developer. Because you must learn how to set it up on the web server (tomcat) - the easiest way is to install the bundle and run it. But you also need to checkout the source code of LR, look at themes (login guest, password empty) and do some reverse engineering. The theme is deployed (via Ant) into a running instance of LR. This is relatively doable even without any Java daveloper's help. After you run "$ant create" in the theme directory, it builds a template theme were you make your themes and deploy them. But there must be a little bit of Ant specific setting in regard to PATHs on the filesystem.

  2. The theme development is straightforward, you just create a _diff of the classic LR theme - you modify an already done theme. The purpose is, that the LR javascript & CSS framework and the CSS hierarchy is quite complex and this is the best way possible.

  3. create portal-ext.properties in tomcat/webapps/ROOT/WEB-INF/classes/, add this line include-and-override=portal-developer-ext.properties and create portal-developer-ext.properties in the same location with this content, which makes UI development JS & CSS much more friendly.

    theme.css.fast.load=false

    theme.images.fast.load=false

    javascript.fast.load=false

    javascript.log.enabled=false

    com.liferay.portal.servlet.filters.strip.StripFilter=false

    com.liferay.portal.servlet.filters.minifier.MinifierFilter=false

    layout.template.cache.enabled=false

    combo.check.timestamp=true

    freemarker.engine.cache.storage=soft:1

    freemarker.engine.modification.check.interval=0

    openoffice.cache.enabled=false

    velocity.engine.resource.manager.cache.enabled=false

    com.liferay.portal.servlet.filters.cache.CacheFilter=false

    com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true

  4. Also there is alloy framework build on top of YUI CSS & JS framework that provides you with a lot of "widgets" and plugins to work with.

Simply put, it very interesting thing to work with and one can learn a lot, but must be willing to spend some time to get into it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文