Evanss
Evanss

Reputation: 23173

LIferay from a front end perspective?

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

Upvotes: 3

Views: 1782

Answers (1)

lisak
lisak

Reputation: 21981

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.

Upvotes: 5

Related Questions