Combination View Flat View Tree View
Threads [ Previous | Next ]
Matteo S
Asset publisher behaviour and improvements + friendlyURL
June 5, 2013 9:46 AM

Matteo S

Rank: New Member

Posts: 7

Join Date: April 14, 2009

Recent Posts

Hi all.
I do propose to improve link management in asset publisher.
Currently, only 2 options are available
1. view in the current AP
2. view in specific portlet

My proposal is adding a third option:
3. open in content selected asset publisher.

JournalArticles do have a field, layoutUuid, which indicates the layout page responsible for content rendering.
This concept should be extended to *ALL* assets via AssetFramework.

Currently, asset publisher can render different asset types, and the new (6.2) application templates allow admins to customize views.
Thus, Asset Publisher should really be the best place to render all asset types, not only web contents.
This way, all assets will have a friendlyURL, unique and permanent (permalink?)

Example use case:
1 page with asset publisher, showing all asset types
1 page with asset publisher, showing only web contents
1 page with asset publisher, showing only document entries

User should click on "FULL VIEW" inside page and be redirected to page or .

All these functionalities should be provided "out of the box", from ServiceBuilder all the way up.
Implementation should be quite easy:
- add a field "layoutUuid" on AssetEntry
- add a struts action to map link to page with selected asset publisher. Something like /-/[assetId OR urlTitle], ex
- tag (liferay-taglib) for selecting pages and asset publishers to be added to edit pages

I did already propose something similar before 6.1 release, and now 6.2 is coming. I did already implement this exact behavior in my custom portlets, any chance to see something similar from Liferay 6.2?

Jorge Ferrer
RE: Asset publisher behaviour and improvements + friendlyURL
June 6, 2013 12:21 AM

Jorge Ferrer


Rank: Liferay Legend

Posts: 2771

Join Date: August 31, 2006

Recent Posts

I find the suggestion interesting in general, but I'm not so sure about some of the specifics.

In particular I'm not sure it's a good idea to implement the concept of "Display Page" that web content has to other assets. Most other assets, if not all, are best displayed by their specific applications and thus the product should not promote displaying them in an Asset Publisher which is generic.

What shortcomings do you find in the "View in specific portlet" option?
Matteo S
RE: Asset publisher behaviour and improvements + friendlyURL
June 6, 2013 1:57 AM

Matteo S

Rank: New Member

Posts: 7

Join Date: April 14, 2009

Recent Posts

I do think Asset Publisher has most if not all the functions required by a CMS:
- multiple view modes, with templates from 6.2+
- categorization, tags support and filtering (mostly static from configuration)
- "related assets", references between assets, although missing ability to set relation direction (ex. parent -> child) and type
- comments and rating system
- url management
- context: links to full view, back links.. keep context from a user point of view

Any portlet, which provides asset framework support, has to provide methods and templates to deal with asset publishers.
The concept of "best displayed" depends only on those templates. When they are complete and feature rich, they can display content as good as the specific portet, and at the same time provide links to "specific portlet" functions for advanced interaction.

Main problems with "View in specific portlet" option are:

1. no control over destination from admin:
1 asset publisher in page "news"
1 media display in page "images"
1 document portlet in page "documents"

When page "news" shows a link (specific portlet) to a document, image or other kind, admin has no control over destination. We do not have any way to say "images" in page image, and pdf in "documents".

2. Loss of user context
When user follows "full view" links, most of the times back link is not provided by "specific portlets", or won't take user back to the point where he left.
An example with blogs, taken straigh from emoticon
click on any blog entry, you will be redirected to user blog in personal pages. Now, you got no way to go back not to the context (page+pagination), neither to the page blogs.
Click on "back" and you will end in user's blog. This is really bad from navigation, we do face this problem every time, users get lost inside liferay links.

3. No way for admin to specify a custom template/view for full content
With addition of "application templates", we can customize render for asset publisher quite easily. Many portlets will adopt this framework, and provide templates to editors to customize views. However, we will have no way to specify templates in a punctual way, ex. say for documents:
- pdf has template X, shown in page Y
- image has template W, shown in page Z

I can go ahead an list up other minor problems, but these are the main ones.
Asset publisher already has most of these functions and can easily be extended with a third option. No need to drop or modify current functionalities, neither to support this from portlets. However, adding this to core and liferay plugins would really help bringing Liferay on par with more widespread CMSs like Drupal.

Besides, friendlyURLs and permalinks for every asset would come out "for free", and this is a missing functionality currently.

I'm more than open on suggestions, thoughts and opinions, this is a proposal. And I'm open to work on implementing or testing.

BTW, thanks for your answer Jorge, good to see Liferay staff is listening to community! And sorry for my English.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!