Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Shabana Popat
Add Custom Portlet above navigation portlet
October 23, 2013 7:57 AM
Answer

Shabana Popat

Rank: Junior Member

Posts: 37

Join Date: December 13, 2012

Recent Posts

Hi,
I want to add a custom portlet above navigation portlet.
I think I have to fix it on portal-normal.vm of the theme that I use. But, I don't know how I can do that.
Can somebody help me to solve it, please.

Thanks in advance
Zsigmond Rab
RE: Add Custom Portlet above navigation portlet
October 23, 2013 1:20 PM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Shabana,

read this and this.

Regards,
Zsigmond
Shabana Popat
RE: Add Custom Portlet above navigation portlet
October 24, 2013 3:21 AM
Answer

Shabana Popat

Rank: Junior Member

Posts: 37

Join Date: December 13, 2012

Recent Posts

Thanks for your reply.
I tried to use $theme.runtime() but I don't know how to get id of portlet wich is developed by a programmer.
For the portlets wich come with liferay we can find it on portlet-diplay.xml.
What about Id for the developer portlets?
Meera Prince
RE: Add Custom Portlet above navigation portlet
October 24, 2013 3:27 AM
Answer

Meera Prince

Rank: Liferay Master

Posts: 860

Join Date: February 8, 2011

Recent Posts

HI
HI simple drag and drop that portlet into any page and go portlet configuration and find sharing tab.

you can see java script in text are there you can see portlet id ok.
Example:
<script src="http://localhost:8080/html/js/liferay/widget.js" type="text/javascript"></script>
<script type="text/javascript">
Liferay.Widget({ url: 'http://localhost:8080/widget/web/guest/who-is-using-liferay/-/corporatenewsadmin_WAR_CorporateNewsportlet'});
</script>


in the above code

corporatenewsadmin_WAR_CorporateNewsportlet this is portlet id. like that you can find to your portlet.

Note: if your portlet is malty instance then you need to generate instance id dynamically by code. i am not sure that code i will send you next if you required ok.
Shabana Popat
RE: Add Custom Portlet above navigation portlet
October 25, 2013 7:59 AM
Answer

Shabana Popat

Rank: Junior Member

Posts: 37

Join Date: December 13, 2012

Recent Posts

Thanks. it was usefull for me. :-)