Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Aaron Paxson
A way to change "Related Assets" portlet?
April 21, 2012 8:25 AM
Answer

Aaron Paxson

Rank: Regular Member

Posts: 103

Join Date: July 27, 2010

Recent Posts

Hey all! I really want to make the "Related Assets" portlet, a standalone portlet. In other words, not dependant on the currently loaded page.

For example, I want to configure it, where it will pull all assets with certain tags or categories in the scope that is defined, rather than on the currently loaded page. Is this possible?

It would be awesome to show readers the most popular assets (view count) of the site, as well as the most recent (modified date).

Can someone give me some pointers or maybe a place to start? Maybe someone has already started on this?

Thanks!
Aaron Paxson
RE: A way to change "Related Assets" portlet?
April 21, 2012 11:28 AM
Answer

Aaron Paxson

Rank: Regular Member

Posts: 103

Join Date: July 27, 2010

Recent Posts

Okay, don't laugh, but I did get a "work around" in. It still would be AWESOME to have this as a portlet. The "Related Assets" Portlet only works for the content found on the same page, rather than looking in the full scope. It would be nice to have the portlet do a search based on "categories" in the full scope. Anyway:

1). I added a blank KnowledgeBase article, with all the tags I want.
2). I added the Display KnowledgeBase article on the page I want.
3). I used CSS to use "display:none" on all the items I wanted to hide, except for the "Related Assets" portion.

For example:

#portlet_3_WAR_knowledgebaseportlet_INSTANCE_dYkCYjV444B0 .kb-article-assets {
display:none;
}

#portlet_3_WAR_knowledgebaseportlet_INSTANCE_dYkCYjV444B0 .kb-entity-header {
display:none;
}

You can see it in the home page of http://www.myteneo.net/home. It's not pretty, but it works.