search documents in liferay - search

I am a beginner with life-ray and I am facing a simple task,which I don't have the slightest idea of how to deal with:
I want to build a portlet which uses the API to add files to liferay. These files should appear in the global search portlet.
Please, tell me where to start I've read several tutorials like http://www.liferay.com/community/wiki/-/wiki/Main/Adding+search+capabilities+to+a+portlet and http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/-asset-framewo-4
,but I feel that these tutorials skip some important steps.

You need not to build the custom portlet for adding files in liferay. They have provide in build portlet for it. you can just add Document and Media Portlet.
http://www.liferay.com/community/wiki/-/wiki/Main/Document+Library+Portlet

Related

Liferay : How to see which portlets are composing a page?

I'm new to liferay.
I imported a big lar into my liferay instance but, for the moment, have none of the required portlets : there are a lot of portlets in the project I'm joining.
Currently, I have the site structure, but the pages display the message that the portlet is not here (logical).
For comprehension purposes, I wanted to build my portlets one after the other, on the need, to see them appear by the grace of liferay ;-)
But for that I wanted to know which portlet is missing.
This thread : How can i find - which portlets are deployed on which pages in Liferay 6.1? explain how to achieve this through the DB.
Is there really no built-in solution to do it through the liferay interface? Have we really to hack in the DB to get the info or install plugin?
Thanks!
In your browser console, Liferay.Portlet.list contains all portlets in the page.
This value is generated by themeDisplay.getLayoutTypePortlet().getAllPortlets() on the server.
As an alternative you can also look at the HTML code of the page and look for elements with the class portlet-boundary. For example this belongs to an instance of the Journal Content Portlet (Portlet name 56):
<div class="portlet-boundary portlet-boundary_56_ portlet-static portlet-static-end portlet-borderless portlet-journal-content full-screen" id="p_p_id_56_INSTANCE_WdRdMGe86kDa_">

Automatic way of export / import pages from liferay

I have created portlets for liferay and prepare couple of pages. Now I want to create installation script, which create pages definition in customer liferay server. I know that pages export/import is possible using LAR file, but this could be done only manualy, or using remote publishing which i am not able to do.
I was searching on net and found ddm tool. Which should be able to do that. Unfortunately i'm not able to get it work as it export only web content, blogs, wikis, etc, but not pages with portlets. It is probably because one of the condition is "Every Template must be assigned to a Structure. Don't create any templates on the Liferay server which does not have a structure connected to it.
". But how can I assign page to structure ? Cant find anything.
Or is there any other option for automatic page creation, which could be used ?
In case you created a custom theme, you can easily use the "resources importer" to create an entire site via the "sitemap.json" file (define pages: choose layout, assign portlets to the columns, ...). You can also export existing content as xml from the current instance and import them via the theme. Same thing for web content structures and templates.
for more details: https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/importing-resources-with-your-themes
Unfortunately theme is produced by another supplier, so this solution isn't suitable for me.
at the end i find working solution which consist of following steps:
create plugin hook
in hook setup upgrade process
in the upgrade process create pages with appropriate layout, friendlyUrl, etc. All these is possible to do using liferay api
Don't have enough reputation, so at least two links
https://www.liferay.com/de/web/james.falkner/blog/-/blogs/7cogs-is-dead-long-live-7cogs-
https://github.com/azzazzel/liferay-official-plugins/tree/master/hooks/sevencogs-hook/docroot/WEB-INF/src/com/liferay/sevencogs/hook/upgrade

Replicate pages from OpenCms to Liferay

I know this is a duplicate post but I needed help here. I had posted about my query before on how should I approach to migrate a website which is currently in OpenCms into Liferay.
I will share whatever I have found on internet and a reply that I got in one of the forums here on stackoverflow.
I was suggested to use ftl templates. but won't it be like executing the code everytime the user makes changes to a web page?
The website has static as well as dynamic pages. I need a way to recreate them in liferay so that in future if the users wish to change the data content of website they can do so easily. IN case of dynamic pages they will upate their database. IN case of static pages they would want to change data (if required) from liferay framework.
How should I create templates and add pages that use a particular template and also add content to the pages?
SHould I write a code or can I do directly from the liferay UI ? Is there a quick way to do this?
Regards

Liferay Search static text within all portlets

I would like to know if built in functionality exists or how to implement functionality to search the static text of JSPs not web content of all deployed portlets in liferay from a centralised portlet (or theme). Unfortunately, there does not seem to be help regarding this issue.
Thanks.
This could be helpful. You must get rid of long and ugly URLs and use Liferay API's mentioned in that Wiki.

Developing a Portlet with Multiple Actions in Liferay

There is a guide on the Liferay site Developing a Portlet with Multiple Actions
Do you know where I should place the code of the MyGreetingPortlet class?
What should be the file name and in which folder I should place it?
Check out the Anatomy of a portlet in the same tutorial.

Resources