How to customize out of box portlets in liferay 7 - liferay

I am trying to customize blog portlet in liferay 7.
I wanted to remove hide some part from jsp file.
How i can do this?

to change some part of core jsp you should use jsp hook. In Liferay 7 you need a osgi fragment module
symbolic name and version in the OSGi header Fragment-Host declaration.
provide a complete copy of the original JSP with any modifications you need to make.
check: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/overriding-core-jsps for more details

Related

Finding specfic jsp page and extenting functionality using hook

I am using liferay. I want to add new functionality to existing jsp page.
I will be using hooks for that purpose.
The problem is how to find existing jsp pages locations?
For example
I want to locate "Add regular Organization" page.
Pls help
Thank you
jsp files under source folder : html\portlet\users_admin\organization and html\portlet\users_admin\edit_organization.jsp are jsps for "Add regular Organization" page.
There are certain ways, liferay provides its functionalities using default portlets that comes with liferay-bundle. You can look at folder portal-web\docroot\html\portlet under portal-src, it will give you idea to locate jsp page locations.
Moreover you can look at portal-web\docroot\WEB-INF\portlet-custom.xml, portal-web\docroot\WEB-INF\struts-config.xml and portal-web\docroot\WEB-INF\tiles-defs.xml for portlet specific actions and respective jsps.

Converting Vignette Portlets to Liferay Portlets

As the title states, i'm trying to convert these Vignette portlets into Liferay portlets.
Is there any documentation on this anywhere? I've searched the entire Internet
-When trying to deploy my WARs right off the bat, I'm getting a "missing liferay.plugin.packet.xml" which tells me the entire portlet must be reconfigured to work with Liferay.
-Running Liferay 6.1.1 ga2 on Web Logic 12c server
Cheers!
You mean "liferay-plugin-package.xml", don't you?
You will find such a file in the source of Liferay at /portal-web/docroot/WEB-INF/liferay-plugin-package.xml. For other examples just download sources from other Portlets (Github or Liferay-Marketplace).
Besides some other values, this file defines how Liferay should handle your war (layout-template, portlet, theme).
EDIT: As the marketplace does not allow (plz see the comment in: liferay-plugin-package_6_1_0.dtd) portlets having an liferay-plugin-package.xml, I would recommend to use the corresponding properties file.
Reference file (in the portal sources): /definitions/liferay-plugin-package_6_1_0.properties

Where should I put my java source and where to configure liferay Portlet

I want to write a simple java source code for a liferay portlet. While I am writing source code for a liferay portlet do I also need to any changes in portlet.xml, liferay-portlet.xml, liferay.display.xml and web.xml
I dont see any information regarding this anywhere.
Any help and suggestions would be much appreciated.
You have to define the portlet class in the portlet.xml file, it is a fully qualified class name like come.help.me.portlet.HelpPortlet
when the portlet will be executed (either by putting on the page or when the page is accessed with the portlet or when any action done on the portlet), this portlet class' methods will be called.
If you are using the liferay-sdk then your portlet class should be in portlet-folder/docroot/WEB-INF/src/eu/ibacz/example/NewPortlet.java of your portlet.
you create a liferay mvc portlet .Just create a liferay project-> liferay portlet and write your java code inside portlet.It will automatically change in portlet.xml, liferay-portlet.xml, liferay.display.xml and web.xml

Portlet content is not shown in Liferay

I've recently started working with portlets, and trying to have experience with several portal engines. I have a basic hello world portlet (extending GenericPortlet and basically doing the same as in all tutorials) that works perfectly with Pluto 2.
I deployed the same portlet to Liferay 6.0, and added it to a page in the portal. Strangely, the portlet frame appears without any content. According to the logs, the portlet init() is called, but doView() is not, thus there's no portlet content in the resulted HTML page.
My question is: should the same portlet work out of the box with Liferay, too? If not, what non-standard descriptors are mandatory for deploying a portlet to Liferay? If yes, what may be the problem? I've seen portlet content height issues mentioned in some forums, but this may not be the problem: the content is not hidden, it's not generated at all.
While checking the relevant file contents to paste here as asked, I realized that my web.xml is empty (as it should be according to Liferay tutorials), but a maven plugin generates pluto-specific invoker definitions into it as defined in my pom.xml. As a result, the generated pluto-specific PlutoInvoker mappings screwed it all up. So it was solved easily, thanks for reading the question though.

Liferay : custom Web content Display List Portlet

I'm beginner in Liferay, and I need to customize the portlet webcontent display list.
I added a portlet in my page Home, and I managed to see the recent news that I created.
The news is displayed in a table (title, author and date display).
I want to display the news like this:
- The date of the news (above the title of the news)
- The title of the news (which is a link to the news)
I tried to create a structure, but I do not see commits its work?
Thank you to enlighten me?
PS: sorry for this English !!
Liferay is available in source - did you look at the implementation of the webcontent list portlet? You can either create a jsp hook for that portlet or just reimplement a similar one based on what you find in there...
As you say you'd like to customize Webcontent display list I assume you don't want its default behaviour. Once you know what to change in this portlet, read about jsp hooks, create a hook with the jsp changes you'd like (if it's limited to jsp changes) and deploy it.
Liferay's development documentation should have the information that you need, otherwise continue in the wiki on liferay.com
Edit: Also, you might want to look at AssetPublisher - maybe this provides a few more options for formatting your output.
Generally Liferay web content in journalarticle table. I have referred Liferay 6.0 Version.
Now, for showing liferay custom portlet view, you should use Liferay Portlet Creation and Liferay Service Builder.
Here are two useful article on those -
1> Liferay MVC Portlet
2> Liferay Service Builder
Now make the service for journalarticle table and use those in your portlet.
Some useful fields of journalarticle table for your reference are - title, createDate etc.

Resources