- Liferay-Reactjs-Portlet-Axios-Yoeman
- Liferay Theme Color Schemes
- Liferay Theme Color SchemesLiferay theme color
This project leverages the Yeoman generators for Liferay DXP and Portal CE projects, to start with we need to install Yeoman globally with the following command.
- npm install -g yo
- npm install -g generator-liferay-js
- yo liferay-js
- The generator will then prompt you to answer some questions. For the first question select React Widget.
Following this you will be asked the following questions:
- What name shall I give to the folder hosting your project? - For this tutorial I typed: react-gallery
- What is the human readable description of your projects - I typed: React Gallery
- Do you want to add localization support? - I selected no
- Do you want to add configuration support? - I selected no
- Under which category should your widget be listed? - I again typed: react-gallery
- Do you have a local installation of Liferay for development? - I selected yes
- Where is your local installation of Liferay placed? - For this you need to copy the folder path for your Liferay installation. On my computer it was located at: C:\Users\Liferay\Desktop\liferay2020\liferay-dxp-tomcat-7.3.10-ga1-20200930160533946\liferay-dxp-7.3.10-ga1
- Do you want to generate sample code - I selected yes The generator will then run.
You can now use your code editor of choice and open the newly created projects folder. My preferences is VS Code. From this point forward I'll also opt to use the build in terminal within VS code for executing commands.
- npm run deploy
If you now go to your Liferay instance, login and navigate to a page where you wish to deploy the React component you will be able to access the React Component from the widgets tab in the page edit.
Below you can see our component called "React Gallery" and how it currently renders on the page (It is currently rendering the sample code created by the Liferay Generator).
/api/jsonws/feedback.feedback/delete-by-id?feedbackId=703
/api/jsonws/feedback.feedback/fetch-feedback?feedbackId=704