First of all you need to add webcontext path in your modules bnd file.
Web-ContextPath: /my-custom-portlet
After adding web context path you can add static resource inside META-INF folder.
main\resources\META-INF\resources\css
You can access CSS files added in above folder by adding following line in your code.
<link href="/o/my-custom-portlet/css/my-custom.css" rel="stylesheet" type="text/css" />
Similar way you can add and use other static resource like JS and Images.
Read other posts on Liferay DXP
How To Read Portlet.Properties File In Liferay DXP
How To Include Custom Portlet In Theme - Liferay DXP
How To Specify External Jar Dependency In Liferay DXP
How To Specify Module Dependencies In Liferay DXP
How To Disable Re-Indexing Of All Journal Article Versions In Liferay DXP
0 comments:
Post a Comment