フォーラム

ホーム » Liferay Portal » English » 2. Using Liferay » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
KK rajput
Asset Link Behaviour
2009/10/05 4:51
答え

KK rajput

ランク: Expert

投稿: 266

参加年月日: 2008/04/10

最近の投稿

Hi ,
In asset publisher portlet under display setting we are having
Asset Link Behaviour in which 2 options are there ?? what is this second option
view in specific portlet
??
How we can use this option??

Thanks
KamalKant
karla jett
RE: Asset Link Behaviour
2009/10/05 6:20
答え

karla jett

ランク: Junior Member

投稿: 35

参加年月日: 2009/09/07

最近の投稿

When you click the link, the content page will be displayed in a specific portlet of your choice..
KK rajput
RE: Asset Link Behaviour
2009/10/05 6:55
答え

KK rajput

ランク: Expert

投稿: 266

参加年月日: 2008/04/10

最近の投稿

Hi Karla,
can you please guide me on this ??
Thanks
Maarten van Heiningen
RE: Asset Link Behaviour
2009/10/30 7:25
答え

Maarten van Heiningen

ランク: Regular Member

投稿: 173

参加年月日: 2009/02/05

最近の投稿

Hi,

Did you get this one to work? I want to set the 'view in a specific portlet' to view a web content article to view in a specified part of my page.

many thanks,
Maarten
KK rajput
RE: Asset Link Behaviour
2009/11/02 20:15
答え

KK rajput

ランク: Expert

投稿: 266

参加年月日: 2008/04/10

最近の投稿

Hi Maarten,
I am not able make it work but I did a work around. If u can tell ur requirements may be I can help u.
Thanks
KamalKant
Maarten van Heiningen
RE: Asset Link Behaviour
2009/11/08 12:26
答え

Maarten van Heiningen

ランク: Regular Member

投稿: 173

参加年月日: 2009/02/05

最近の投稿

Hi Kamalkant,

I've created a work around as wel. It's not a very good one (when upgrading liferay this has to be done again) but it does the job.

in the /root/html/portlet/asset_publisher/display directory there is a file title_list.jsp

On the line 173 there is '<a href="<%= viewURL %>">'

change this to:

<a href="<%= viewURL.replaceAll("0Cbk","l8vB") %>">

Where the link presenter asset_publisher instance is changed by the displaying asset publisher
This works when both are on the same page and for only two instances off the portlet.
If you also want to point from one page to a specific page, lets say news. You also have to do something like this

<%
String NewveiwURL = viewURL;
NewveiwURL = NewveiwURL.replaceAll("/home?","/news?");
NewveiwURL = NewveiwURL.replaceAll("qfW5","l8vB"); // instance on the homepage
NewveiwURL = NewveiwURL.replaceAll("0Cbk","l8vB"); // instance on the news page linking to thirt instance display on the news page
%>
<a href="<%= NewveiwURL %>">

In the configuration set the link presenter asset_publisher to displaying 'Titles' and not 'Full content'

Fairly simple and effective.

This is temporary as I hope the next release 5.2.4 will fix this issue.

Is your fix something like this?

Regards,
Maarten
Rajeev K
RE: Asset Link Behaviour
2010/05/25 2:56
答え

Rajeev K

ランク: Regular Member

投稿: 214

参加年月日: 2009/06/18

最近の投稿

Hi Maarten,

I am using a asset publisher in an IFrame using Liferay.Widget({.....})

<%= viewURL.replaceAll("fWd1","7PzV") %> works fine with an independent asset publisher portlet.

But I have embedded my asset publisher in a IFrame. Therefore viewURL.replaceAll does not work in this condition and I get a liferay UI error message -- 'You do not have the roles required to access this portlet.'

Please suggest how to solve this IFrame related issue.
Matthias Fenz
RE: Asset Link Behaviour
2010/08/16 1:56
答え

Matthias Fenz

ランク: Junior Member

投稿: 79

参加年月日: 2009/03/24

最近の投稿

hi guys,

for me, the problem is a bit more complex... maybe somebody has an idea how to solve this (no problem with an workaround):

i have three different types of pages:

home, news and several "specialized" news pages

different persons should enter their news only on "their" specialized page

-> all news titles shall be displayed on the "news" page
-> the related news should be displayed in the depending portlet on "home"

(to describe more clearly... it's for a football club, so i have section "tem news", "club news", "youth", etc... coach enters news in the section "team news", news title shall appear on the news page as on "home" in the portlet configured to show titles of "team news").

so far, so good.

the problem is, i'd like to link the title to the specific news page, in this example, when you click on an entry for "team news" on the "home" page, the entry won't be shown in this portlet, instead you should be warped to the specific news page ("team news" in that case), where the full content is shown...

anybody an idea how to solve this?

thanks in advance for every hint... emoticon
KK rajput
RE: Asset Link Behaviour
2010/08/20 3:18
答え

KK rajput

ランク: Expert

投稿: 266

参加年月日: 2008/04/10

最近の投稿

Hi ,
How many asset publisher portlets you are having on that page on which you are showing full content.If you are having only one portlet then you can easily do it by following simple steps.
1.Get the layoutId of that page as you are having predefined pages that will not be the issue.For specific method check LayoutLocalServiceImpl.java.
2.Create the portletUrl e.g.
PortletURL portletURL = new PortletURLImpl(request, [$your_portlet_name$], [$layoutId_from_step1$], PortletRequest.RENDER_PHASE);
regionURL.setPortletMode(PortletMode.VIEW);
3.Onclick invoke url you have got in step 2.

HTH
KamalKant
Manish Kumar Jaiswal
RE: Asset Link Behaviour
2010/12/30 22:37
答え

Manish Kumar Jaiswal

ランク: Regular Member

投稿: 133

参加年月日: 2008/11/25

最近の投稿

Does this (Asset Link Behaviour) works in 6.0.4...??????????
Daniel Breitner
RE: Asset Link Behaviour
2011/01/03 5:13
答え

Daniel Breitner

ランク: Junior Member

投稿: 96

参加年月日: 2008/07/16

最近の投稿

Hi, don´t know if you are still interested in a (possible) solution to your problem, but this might help:

http://liferay-blogging.blogspot.com/2010/12/how-to-create-link-to-webcontent-in.html

The URL you create you can enter in the title_list.jsp page.

With kind regards


Daniel Breitner