Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Asset Publisher: Asset Link Behaviour Joshua Asbury February 25, 2009 1:03 PM
RE: Asset Publisher: Asset Link Behaviour Amos Fong February 26, 2009 3:39 PM
Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Beha Joshua Asbury February 27, 2009 3:49 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Amos Fong February 27, 2009 10:14 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Joshua Asbury March 3, 2009 2:27 PM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Amos Fong March 3, 2009 3:32 PM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Joshua Asbury March 4, 2009 3:16 PM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Mincke Gert August 4, 2011 1:36 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Octavian Susnea August 9, 2011 1:43 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Mincke Gert August 11, 2011 1:38 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Wes Kempa February 15, 2012 9:04 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Scott Rabon February 28, 2012 3:42 PM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Wes Kempa March 27, 2012 7:56 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Joshua Asbury April 21, 2009 1:55 PM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link jerin jacob May 12, 2009 7:15 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link jerin jacob May 14, 2009 6:11 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Dana Oredson June 4, 2009 6:51 AM
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Catalina Sofia Libuy December 2, 2009 1:52 PM
Joshua Asbury
Asset Publisher: Asset Link Behaviour
February 25, 2009 1:03 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Hi all -

I am working on a new site in 5.2.2 and see the configuration setting entitled "Asset Link Behaviour" in the Asset Publisher. I would like to utilize this in my instance, but I don't see where to put the portlet ID where I would like the assets to open. Any thoughts on this?

Thanks!
Josh
Amos Fong
RE: Asset Publisher: Asset Link Behaviour
February 26, 2009 3:39 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1844

Join Date: October 7, 2008

Recent Posts

From what I can tell, it looks for the portlet by itself...if it doesn't find one, then it displays it in asset publisher.

eg. blogs entries will direct to the blog portlet, bookmarks to bookmark portlet etc.
Joshua Asbury
Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link Beha
February 27, 2009 3:49 AM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Hmmm...I'm not sure I understand. If I have a page with 4 different
asset publishers on it, styled to only view a single journal article's
abstract, then I'd like for it to open up on another page -- or at
least in an asset publisher that is large enough to view the whole
thing.

For example, if I have an asset publisher that is on the right side of
a 70/30 layout template, the articles would look better if they were
displayed in full in the left hand side or, better yet, on another
page's left hand side in the 70% area. Is that not possible? I'm not
seeing how to make that happen...

Thanks!
Josh



On Feb 26, 2009, at 6:39 PM, Amos Fong from liferay.com wrote:

> From what I can tell, it looks for the portlet by itself...if it
> doesn't find one, then it displays it in asset publisher.
>
> eg. blogs entries will direct to the blog portlet, bookmarks to
> bookmark portlet etc.
> --
> Liferay Message Boards
> http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2331348
> mb.312107.2331348@events.liferay.com
> http://www.liferay.com
Amos Fong
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
February 27, 2009 10:14 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1844

Join Date: October 7, 2008

Recent Posts

oh I see...it doesn't look like it affects journal articles...see abstracts.jsp to see how it works with other types
Joshua Asbury
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
March 3, 2009 2:27 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Amos -

What do you think about this as a workaround?

If the asset publisher appears on a certain page, I set this:
1viewURL = themeDisplay.getURLPortal()  + "/web/guest/home2/-/journal_content/56_INSTANCE_0AmI/173367/" + articleDisplay.getArticleId();


home2 is a copy of the home page but with a blank journal display portlet in it (community ID is 173367...).

Since this is a very special case, I'd only like the viewURL to be generated in this fashion on a certain page and in a certain community.

2 questions:
1. Do you think I'm off my rocker?
2. How would you recommend I go about getting the pageID in the abstracts.jsp? Should I also check by instance as well?

Thanks!
Amos Fong
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
March 3, 2009 3:32 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1844

Join Date: October 7, 2008

Recent Posts

Josh Asbury:

1. Do you think I'm off my rocker?


nope, sounds good to me =)


2. How would you recommend I go about getting the pageID in the abstracts.jsp? Should I also check by instance as well?


pageID? do you mean the plid? You can do themeDisplay.getPlid();

What do you mean by "check by instance"?
Joshua Asbury
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
March 4, 2009 3:16 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Thanks, Amos! I got it rocking. What I meant by instance was to check if it was a certain company since I am running multiple instances in my installation. I'm thinking that doing so will increase efficiency.
Joshua Asbury
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
April 21, 2009 1:55 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Amos,

FYI, I have created http://issues.liferay.com/browse/LPS-3028 as an improvement to the asset publisher. You can see the behavior that I have put together using the methods that we discussed at http://www.brethrenchurch.org/web/brethren/home -- but as time goes on, I can see my abstracts.jsp getting to be very nasty. Seems like it should be a relatively minor change to the asset publisher which could yield some big gains in regards to usability.
jerin jacob
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
May 12, 2009 7:15 AM
Answer

jerin jacob

Rank: New Member

Posts: 11

Join Date: March 23, 2009

Recent Posts

What has to done for displaying asset publisher in a full page when clicked on Read more>.....


I have placed a asset publisher in a corner which diaplays only abstarct ... when clicked on read more > it should display as maximized .. what setting should i do for this ?
Please help on this ...
jerin jacob
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
May 14, 2009 6:11 AM
Answer

jerin jacob

Rank: New Member

Posts: 11

Join Date: March 23, 2009

Recent Posts

What and where change is to be done on abstrtact.jsp so that I can view the content in new page or in a bigger layout ??
Dana Oredson
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
June 4, 2009 6:51 AM
Answer

Dana Oredson

Rank: Junior Member

Posts: 70

Join Date: October 14, 2008

Recent Posts

jerin jacob:
What and where change is to be done on abstrtact.jsp so that I can view the content in new page or in a bigger layout ??


That works for me out of the box in Title mode, anyway.
For example, I added an article to the asset publisher. It displays the title of the article. Clickin on the article maximizes Asset Publisher, with only the selected article. Have not tried in abstract mode, though.
Catalina Sofia Libuy
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
December 2, 2009 1:52 PM
Answer

Catalina Sofia Libuy

Rank: New Member

Posts: 3

Join Date: December 2, 2009

Recent Posts

Hi

I'm trying to modify asset publisher, I need the "Read more" link to display the content on a new window, like a simple "_blank" target.
That's becouse I need to show this portlet in other web sites, but I don't want the full articles to be displayed in such a small frame as the publisher it self (in fact, once the post it's opened, all the original web site it's displayed in the little frame with awful scroll-bars) .

I'm not a developer, just know some basic html. ¿Can anyone help?... thanks!
Mincke Gert
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
August 4, 2011 1:36 AM
Answer

Mincke Gert

Rank: New Member

Posts: 2

Join Date: August 4, 2011

Recent Posts

Joshua Asbury:
Thanks, Amos! I got it rocking. What I meant by instance was to check if it was a certain company since I am running multiple instances in my installation. I'm thinking that doing so will increase efficiency.


I'm having some trouble making this work and was hoping I could get some more support.
I'm using Liferay 6.0.5 and I'm trying to get the links from the asset publisher on my homepage to forward me to a specific page (in my case artikels) and there open the content of that article in another instance of the asset publisher (or if there are other suggestions about in what kind of portlet I best display my content...).
I can obviously edit the look and feel to make the links go to the artikels page, but then from there on I'm lost.

I have created a new folder for the asset publisher in my ext project and in there I have edited the abstracts.jsp.
I changed the viewURL in the way Joshua mentioned, although I didn't completely get what you did with the plid.

As I have been trying just about everything to get this working, I'll post the structure of where I placed my files in the ext project, just to make sure that I've gotten that right.
projectx-ext
--> docroot
--> WEB-INF
--> ext-web
--> docroot
--> html
--> portlet
--> asset_publisher

I have copied the asset_publisher folder completely from the portal project and I have adjusted the abstracts.jsp.


Regards,

Gert
Octavian Susnea
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
August 9, 2011 1:43 AM
Answer

Octavian Susnea

Rank: New Member

Posts: 4

Join Date: January 10, 2011

Recent Posts

I struggling with the same issue as Gert mentioned. Could anyone help us? This asset publisher is kind of a pain in the.
Mincke Gert
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
August 11, 2011 1:38 AM
Answer

Mincke Gert

Rank: New Member

Posts: 2

Join Date: August 4, 2011

Recent Posts

I've been able to solve the issue!
As the solutions for this issue were scarse I will post my way of solving the issue.

Adding the Asset Publisher to the appropriate pages
  • Log in to the admin section
  • go to the page where you want to add the asset publisher from where you want to link (to another page)
  • add the asset publisher
  • go to the "look & feel" section of this asset publisher instance
  • in the section "Link Portlet URLs to Page" select the page you want to refer to
  • save
  • go to the configuration of this asset publisher instance
  • got the section "Display Setting" -> "Asset Link Behaviour" and change the value to "View in a specific portlet"
  • save


Now we will continue by going to the page where you want the articles to be shown. Once there, you need to
add a new Asset Publisher, but for the further continuation of this fix you will need some info from this Asset Publisher,
namely the portlet ID. Open the “Look and Feel” of this Asset Publisher instance and then go to the tab “Advanced Styling”.
There you will see the Portlet Id of this Asset Publisher. Write down the last 4 letters as we will need these later on.

Edit the core of the Asset Publisher
Since the overloading of files by using the -ext environment wasn't working for me, I had to hack into the core of liferay itself. Since the only thing you need to change can be found in a JSP, there is nothing you need to rebuild, so no issue there.
So after Liferay has been successfully deployed on your server, then you need to edit a file directly in the build, namely the abstracts.jsp (as mentioned earlier in this thread). You can find this file at (depending on your version of liferay) “\liferay-portal-src-6.0.5\portal-web\docroot\html\portlet\asset_publisher\display\abstracts.jsp”.

In there you need to override the viewURL.
The viewURL ‘s last edit, before it is used, is at line 56 (for me). Make a new line right after this one as such:
viewURL = themeDisplay.getURLPortal() + themeDisplay.getPathFriendlyURLPrivateGroup() + "/guest/artikels/-/asset_publisher/QF0v/content/" + assetRenderer.getUrlTitle();

At the point where you see “QF0v”, this is the identifier of the Asset Publisher on the second page. So there you need to place the identifier you wrote down earlier.
The part "/guest" is our own Friendly URL and "artikels" is the page where the second Asset Publisher is (in my case).
Wes Kempa
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
February 15, 2012 9:04 AM
Answer

Wes Kempa

Rank: New Member

Posts: 17

Join Date: July 29, 2008

Recent Posts

Mincke Gert:

Adding the Asset Publisher to the appropriate pages
  • Log in to the admin section
  • go to the page where you want to add the asset publisher from where you want to link (to another page)
  • add the asset publisher
  • go to the "look & feel" section of this asset publisher instance
  • in the section "Link Portlet URLs to Page" select the page you want to refer to
  • save
  • go to the configuration of this asset publisher instance
  • got the section "Display Setting" -> "Asset Link Behaviour" and change the value to "View in a specific portlet"
  • save




Instead of modifying core Liferay to target a specific asset publisher instance you can create a copy of the existing asset publisher page so that the instance of the asset publisher stays the same on the second page. With this in mind your steps would look like this:

  • Log in to the admin section
  • go to the page where you want to add the asset publisher from where you want to link (to another page)
  • add the asset publisher to Page A
  • Duplicate Page A as Page B
  • go to the "look & feel" section of page A's asset publisher instance
  • in the section "Link Portlet URLs to Page" select the page you want to refer to and select Page B
  • save
  • go to the configuration of this asset publisher instance of Page A
  • got the section "Display Setting" -> "Asset Link Behaviour" and change the value to "View in a specific portlet"
  • save


Much quicker and requires no core changes!
Scott Rabon
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
February 28, 2012 3:42 PM
Answer

Scott Rabon

Rank: Junior Member

Posts: 48

Join Date: April 15, 2010

Recent Posts

Wes:
I tried following your steps but when I click and go to page B, the asset publisher just shows everything. Is there more to your instruction "Duplicate Page A as Page B"? What do you mean by that? Also, is there any configuration to the asset publisher on page B?

Thanks,
Scott
Wes Kempa
RE: Re: [Liferay Forums][2. Using Liferay] RE: Asset Publisher: Asset Link
March 27, 2012 7:56 AM
Answer

Wes Kempa

Rank: New Member

Posts: 17

Join Date: July 29, 2008

Recent Posts

Duplication of the page can be done by adding a page that is a copy of the first page that contains the asset publisher. You can do this by going into the page management and creating a new page (hidden works best for this workflow) then using the "Copy Page" dropdown to create a duplicate of the first page that contains the asset publisher. In this case the asset publisher IDs would be the same and reside on two separate pages.

No configuration of the second page is required. Just make sure to change the "Link Portlet URLs to Page" within the "Look & Feel" section of the first asset publisher instance and you should be good to go.