Asset Library Intrigue

Exploring the new Asset Libraries feature of Liferay 7.3.1 CE GA2

After I executed a couple projects in Liferay 7.1 back in late 2018, I found myself in a series of DXP 7.0 projects, and then dipped into a few Liferay 6.2 projects a well. As that honor is not letting up, I decided to force myself into catching up by pulling down the latest 7.3.1 CE GA2 to see how much has changed. I was pleasantly unsurprised. 

This post takes a look at the Asset Libraries feature in 7.3 CE. Liferay is calling it experimental, meaning it may not make it into a DXP 7.3 release in the state it is currently in.

Sweet Interface

So, here goes. The first thing I noticed once I logged to my brand new 7.3 CE instance was how crisp and clean the new interface was. I noticed some improvements to the theme – the menu transitions feel much smoother.

New Menu for Asset Libraries

Getting past the gloss, you can’t miss that the Control Panel now has an Asset Libraries sub menu. And that will be the focus of the rest of this brief post.

I had to do some looking around and found this epic under LiferayIssues: https://issues.liferay.com/browse/LPS-102412

It turns out this feature has to do with the ability to have multiple content repositories that can be attached to one or more sites through a connection, whenever desired. And it can be detached from those sites when no longer needed. The idea is to get away from the singular global site repository that tends to get crowded with shared data and hard to organize. I think this is great, in theory. I had to see how it worked in practice. 

Adding Asset Libraries

Of course, I got curious about how this connection would be established. So I clicked the plus icon to add an Asset Library.

So far so good. I then clicked the Sites menu in the left-hand sidebar and voila!

That’s where I connect the Asset Library to my site(s). This is exciting. I was curious around how the portal would behave when I create a few of these asset libraries and attach them to multiple sites. So I began that phase of exploration by creating a couple asset libraries.

I connected both Asset LIbraries to my default Liferay site. (Only one shown below.)

Adding Content To New Asset Libraries

I added a test Web content article to each. (Only one shown below.)

Where am I ?!?

Note above, that as soon as I clicked the Asset Library named Sample, the left-hand menu self-arranged so that I do not see the SITE Liferayaccordion anymore. Instead I see the ASSET LIBRARY Sample accordion. 

This threw me off at first, but I soon recovered because I am tuned to how Liferay typically tries to locate a way out of a problem, near the problem. So I clicked the compass icon next to the ASSET LIBRARY Sample accordion header and was immediately given the choice to switch to another Site, or Asset Library.

Let that sink in a bit. Site or Asset Library So now you can switch your repository context to that of another site OR another asset library. I’m good with that. If this seems like a bit of a learning curve, that’s okay. You really just have to start playing with multiple sites to start becoming comfortable with the idea.

Portlet to content: Hello? Hello?

Once I added my two Asset Libraries and one content item to each, I was curious to select the content item and place it on a portal page using a Web Content Display portlet instance. I proceeded to first try and just grab the content item using the dockbar’s content search feature. It did not show up.

Okay, so maybe the connection of the Asset Library to my site does not enable the content to show up here. I think that’s odd (and possibly a bug) because Searchable Content was Yes under Connected Sites for both of my Asset Libraries.

Moving along. I dragged and dropped a Web Content Display portlet instance onto my portal page.

And then I clicked Select Web Content to make it visible inside of the Web Content Display portlet.

Clicked Sites and Libraries from the breadcrumbs.

Clicked the Asset Library tab and then clicked the Sample asset library. 

I then proceeded to select the web content article. I found it odd that there was a checkbox metaphor here, was expecting the web content article title to be clickable to effect the selection.

And it looks like we have a bug. As soon as I select the checkbox, the page I see looks like the below. Clicking Save does nothing, and I’m back to where I started from.

I checked with the author of this post (see the comments section) 

https://liferay.dev/blogs/-/blogs/asset-libraries-colaboracion-entre-sitios

…and he confirmed it is a bug. I’ve opened a ticket for this bug here:

https://issues.liferay.com/browse/LPS-113040

Closing Notes

Note that the Asset Libraries feature can be turned off via System Settings.

I am really intrigued by what I see so far. I’m waiting to explore the feature more. I definitely think it holds promise.

Published by Javeed

Java/JEE solution provider. Liferay Portal enthusiast. I am a Software Engineer with a focus on highly maintainable solutions that lie at the sweet spot intersection of modularity, extensibility and development team productivity. I enjoy experimenting with innovative documentation ideas.

Leave a comment