Every business wants a beautifully designed website — with stunning pictures, functional components, and appealing buttons. Thankfully, powerful themes are available in the Liferay Portal that can create websites and portals for businesses large and small. While a designer or developer may want to use the default or custom themes provided in Liferay Portal to build websites and portals, they may not access the source code.
What exactly is a Liferay theme?
Liferay is an open-source content management system (CMS) and portal. It’s excellent for creating customer-centric online experiences that are easy to use, engaging, and accessible on any device. Liferay is flexible enough to fit different business needs, with out-of-the-box eCommerce cart, blogs, forums, and even real estate applications.
Liferay theme is a tool for creating the visual appearance of portlets and pages on your site. You can define a structure for the pages (header, footer, content) and apply styling to it. Themes can also implement responsive design, provide personalization features, or import required resources to the portal. Liferay comes with several built-in themes that you can use for your portal. The good news is you can order Liferay DXP theme development and not worry about anything.
Tips and tricks
Liferay themes are a fantastic way to make your website look better. But let’s see how a good combination between JavaScript and HTML works together to provide you with the best possible experience.
Turn off the Drop Down dock
You don’t need an interactive dock for your store’s theme, but if you want it to display a list of actions, you can remove the interactive-mode class from the dock div. Just open dock.vm and then find “interactive-mode” and disable it. And voila – you have turned it off.
Remove the drag and drop functionality
It might be an excellent option for some people to use “drag and drop.” It certainly helps create a great UX design. But this should not be the case in every situation. The ability to turn it off is possible in Liferay. Let’s see how it happens. The “sort-pages” tag helps you add elements with a drag & drop functionality. Removing the tag means you will add pages easily, but without this feature.
Add private pages
Liferay, a leading open-source portal, includes new interactive modal windows that allow users to create private pages and folders quickly or use existing content as a template for their new page. What’s more, they can now paste content from any other application into the modal windows, making it to add content to a private library. Let’s see how.
- Organize your page using Sitemap, portals, etc.
- Exports your page to the LAR file
- Copy this file to deploy/ (deploy/example.lar)
- Now let’s add that to a portal-ext.properties default.user.private.layouts.lar=${liferay.home}/deploy/example.lar
- Restart the app
Use EntityLocalServiceUtil instead of EntityUtil whenever you can
There is a very significant reason to use this method. Using the second method would potentially give you a chance to activate user and then deactivate it when they’re no longer active. Well, it is only half the truth, and sometimes, it happens to keep the data. That isn’t the case when you use EntityLocalServiceUtil.
The second call associates the user account to the specified group and becomes an association administrator. The second call adds the user internally, but the operation is not visible when looking in the Assign Members area of a user group. With EntityLocalServiceUtil, you have no such issues.
Liferay is a powerful content management system that offers user-friendly tools for creating rich e-commerce experiences. But it can be difficult for first-time users to tailor the platform to their specific needs. With some help, however, anything becomes possible.
By Andrej Kovacevic
Updated on 13th March 2022