Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Atif Hussain
Any possible way to customize asset publisher without going totally mad ?
June 16, 2013 4:05 AM
Answer

Atif Hussain

Rank: Junior Member

Posts: 47

Join Date: April 3, 2012

Recent Posts

After days of googeling and exploring liferay form I am unable to find out how to modify Asset Publisher according to my requirements emoticon.
In my case there are 3 pages.
On Page 1 I want to add Default Asset Publisher
On Page 2 I want to add Asset Publisher in Grid form.
On Page 3 I want to put Asset publisher in Carousel.

What I have concluded it to make a custom portlet for this. But I need an expert suggestion before starting to code.

Regards,
Atif Hussain.
Sreeraj AV
RE: Any possible way to customize asset publisher without going totally mad
June 18, 2013 4:15 AM
Answer

Sreeraj AV

Rank: Regular Member

Posts: 236

Join Date: April 26, 2010

Recent Posts

I will prefer hooks to customize asset publisher.. If you look into \tomcat-6.0.29\webapps\ROOT\html\portlet\asset_publisher\display folder, you can see different JSP files for different types of view.. You can add your own JSP files depending ur requirement and I am sure this will not take more than 16hrs for you..


Atif Hussain:
After days of googeling and exploring liferay form I am unable to find out how to modify Asset Publisher according to my requirements emoticon.
In my case there are 3 pages.
On Page 1 I want to add Default Asset Publisher
On Page 2 I want to add Asset Publisher in Grid form.
On Page 3 I want to put Asset publisher in Carousel.

What I have concluded it to make a custom portlet for this. But I need an expert suggestion before starting to code.

Regards,
Atif Hussain.
Olaf Kock
RE: Any possible way to customize asset publisher without going totally mad
June 19, 2013 1:34 AM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 3455

Join Date: September 23, 2008

Recent Posts

As always, there are many option to achieve what you want - some even without any changes to AssetPublisher:

As you're speaking about different AssetPublisher instances, you can just use custom CSS - go to an AssetPublisher's "Look and Feel" / "Advanced Styling" dialog. Choose "Add a CSS rule for just this portlet." and optionally check "Update my styles as I type" - then enter the CSS code you need for this portlet an watch it change in the background.

For a Carousel, you also need some Javascript, but you can add this through "Manage Page" on the page level and just make it address the AssetPublisher's part of the DOM. This is good for a one-shot change, not if you have to maintain such a setup on a repeated basis.

Next, you can also extend the display styles that AssetPublisher offers and add a "carousel" option there: You can then choose this option, in addition to the "full text", "abstract", and other display options that AssetPublisher already offers. This is a good option if you have repeated requirements to add this display style, but it's also the most invasive - also it's a bit too much to explain in this post. However, if you look at the current display styles and how they are implemented (you can just use their names to identify them in AssetPublisher) you might figure it out.
Atif Hussain
RE: Any possible way to customize asset publisher without going totally mad
June 22, 2013 3:11 AM
Answer

Atif Hussain

Rank: Junior Member

Posts: 47

Join Date: April 3, 2012

Recent Posts

Thank you Sreeraj, i have noticed that Hooks and Exts will change Asset Publisher's on the portal scope. But I need to make changes on instance level.
Olaf Kock's suggestion seem working. I will give that a try and will share if that works or not.
Atif Hussain
RE: Any possible way to customize asset publisher without going totally mad
June 22, 2013 3:15 AM
Answer

Atif Hussain

Rank: Junior Member

Posts: 47

Join Date: April 3, 2012

Recent Posts

Thanks Olaf, I think your solution can work, I will try this.

Olaf Kock:
As always, there are many option to achieve what you want - some even without any changes to AssetPublisher:

As you're speaking about different AssetPublisher instances, you can just use custom CSS - go to an AssetPublisher's "Look and Feel" / "Advanced Styling" dialog. Choose "Add a CSS rule for just this portlet." and optionally check "Update my styles as I type" - then enter the CSS code you need for this portlet an watch it change in the background.

For a Carousel, you also need some Javascript, but you can add this through "Manage Page" on the page level and just make it address the AssetPublisher's part of the DOM. This is good for a one-shot change, not if you have to maintain such a setup on a repeated basis.

Next, you can also extend the display styles that AssetPublisher offers and add a "carousel" option there: You can then choose this option, in addition to the "full text", "abstract", and other display options that AssetPublisher already offers. This is a good option if you have repeated requirements to add this display style, but it's also the most invasive - also it's a bit too much to explain in this post. However, if you look at the current display styles and how they are implemented (you can just use their names to identify them in AssetPublisher) you might figure it out.
Luan Nguyen
RE: Any possible way to customize asset publisher without going totally mad
August 13, 2013 2:25 AM
Answer

Luan Nguyen

Rank: New Member

Posts: 7

Join Date: May 27, 2013

Recent Posts

Dear Atif, I got the same problem as you. I wonder if you could share some example code or tips how you solved your solution asset publisher carousel.
Thank you
Atif Hussain
RE: Any possible way to customize asset publisher without going totally mad
October 15, 2013 6:47 AM
Answer

Atif Hussain

Rank: Junior Member

Posts: 47

Join Date: April 3, 2012

Recent Posts

Hi,
Well I wrote my own asset publisher portlet. But it was not as comprehensive as Liferay's default asset publisher portlet is. I would recommend you to wait for Liferay CE 6.2. This up coming version support a lot of customization features for Asset Publisher.