Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Joseph Wolfe
Asset Publisher Modification
February 7, 2012 5:07 AM
Answer

Joseph Wolfe

Rank: Regular Member

Posts: 103

Join Date: February 22, 2011

Recent Posts

I have an urgent need to make a modification to the Asset Publisher portlet in order to accomplish the following

In the Configuration settings>Display Settings

Display Style = Full Content
Show Context Link = enabled

Currently the displayed link appears as:

Link Name (http://www.link.com) (Opens New Window)

I need it to appear as:

Link Name

I have been looking thru the files in the Asset Publisher portlet, but have not figured out which changes are necessary to accomplish this simple task. Are the settings in the CSS or the jspf files?

Thanks in advance!
Joseph Wolfe
RE: Asset Publisher Modification
February 7, 2012 10:29 AM
Answer

Joseph Wolfe

Rank: Regular Member

Posts: 103

Join Date: February 22, 2011

Recent Posts

I thought the settings were in the

view_dynamic_list.jspf

but it does not appear to be so.
Ram Manusani
RE: Asset Publisher Modification
February 7, 2012 10:52 AM
Answer

Ram Manusani

Rank: Regular Member

Posts: 124

Join Date: October 27, 2011

Recent Posts

It should be in display_settings.jsp file.
Joseph Wolfe
RE: Asset Publisher Modification
February 7, 2012 12:14 PM
Answer

Joseph Wolfe

Rank: Regular Member

Posts: 103

Join Date: February 22, 2011

Recent Posts

Ram Manusani:
It should be in display_settings.jsp file.


I don't think so...
Joseph Wolfe
RE: Asset Publisher Modification
February 8, 2012 11:59 AM
Answer

Joseph Wolfe

Rank: Regular Member

Posts: 103

Join Date: February 22, 2011

Recent Posts

I cannot believe that this is not possible. I have been through everything in there and cannot figire out how to perform this simple modification. If anyone can help me out I will buy you a beer.
Thanks
Riccardo Ferrari
RE: Asset Publisher Modification
February 8, 2012 2:17 PM
Answer

Riccardo Ferrari

Rank: Regular Member

Posts: 137

Join Date: November 13, 2010

Recent Posts

Can you tell me which Liferay version are you running? I agree that it shouldn't be difficult.

Regards
Joseph Wolfe
RE: Asset Publisher Modification
February 9, 2012 3:53 AM
Answer

Joseph Wolfe

Rank: Regular Member

Posts: 103

Join Date: February 22, 2011

Recent Posts

I am using Liferay 6.0.6.

Was looking at it again last night and am still stumped.

Thanks!
Riccardo Ferrari
RE: Asset Publisher Modification
February 10, 2012 2:20 AM
Answer

Riccardo Ferrari

Rank: Regular Member

Posts: 137

Join Date: November 13, 2010

Recent Posts

I understand that you are talking abount bookmark asset? isn't it?
The jsp file that is involved in rendering that kind of content is in:
portal-web/docroot//html/portlet/bookmarks/asset/full_content.jsp, here is the code:

1
2<%@ include file="/html/portlet/bookmarks/init.jsp" %>
3
4<%
5BookmarksEntry entry = (BookmarksEntry)request.getAttribute(WebKeys.BOOKMARKS_ENTRY);
6%>
7
8<aui:a href='<%= themeDisplay.getPathMain() + "/bookmarks/open_entry?entryId=" + entry.getEntryId() %>' target="_blank"><%= entry.getName() %> (<%= entry.getUrl() %>)</aui:a>


You should override it using an hook.
Hope it helps
Joseph Wolfe
RE: Asset Publisher Modification
February 10, 2012 8:50 AM
Answer

Joseph Wolfe

Rank: Regular Member

Posts: 103

Join Date: February 22, 2011

Recent Posts

Ricardo-
Thanks for steering me in the right direction:

For anyone needing to do this, here is the Hook that needs to be implemented:

**********************************************************************************************

<%@ include file="/html/portlet/bookmarks/init.jsp" %>

<%
BookmarksEntry entry = (BookmarksEntry)request.getAttribute(WebKeys.BOOKMARKS_ENTRY);
%>

<aui:a href='<%= themeDisplay.getPathMain() + "/bookmarks/open_entry?entryId=" + entry.getEntryId() %>' target="_default"><%= entry.getName() %></aui:a>

<p class="asset-description"><%= entry.getComments() %></p>

<liferay-ui:custom-attributes-available className="<%= BookmarksEntry.class.getName() %>">
<liferay-ui:custom-attribute-list
className="<%= BookmarksEntry.class.getName() %>"
classPK="<%= (entry != null) ? entry.getEntryId() : 0 %>"
editable="<%= false %>"
label="<%= true %>"
/>
</liferay-ui:custom-attributes-available>