Meet The Author

I'm Jitendra Rajput (Senior Consultant @ CIGNEX Datamatics) , A Programmer , Blogger ,Liferay Top Contributor for Year 2014 Q4, Liferay 6.1 Certified Professional , Technology Enthusiast and apart from this interested in making new friends , love music and love to play CHESS. Expressing my thoughts using blog.

author
Showing posts with label Liferay DXP. Show all posts
Showing posts with label Liferay DXP. Show all posts

Set 'X-Frame-Options' in Liferay DXP to allow iframe access

Leave a Comment
Set 'X-Frame-Options' in Liferay DXP to allow iframe access
You might have seen below error message in your browser console while including any of the Liferay page url in iframe.

Refused to display 'liferay-url' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Liferay does not allow access to any of its url using iframe if the request is coming from different domain. If the domain is same you will be able to access Liferay url using iframe.
Read more »

How to read portlet.properties file in Liferay DXP

Leave a Comment

How to read portlet.properties file in Liferay DXP

In case if you are using portlet.properties file in Osgi module then using below snippet you can read property specified in portlet.properties file.

private static final Configuration _configuration = ConfigurationFactoryUtil
  .getConfiguration(ReportUtil.class.getClassLoader(), "portlet");

String fromEmailAddress = _configuration.get("report.form.emailaddress");


Read more »

How to include static resources (CSS/JS/Images) in Liferay OSGI module

Leave a Comment
How to include static resources (CSS/JS/Images) in Liferay OSGI module As you know development approach has been completely changed with Liferay DXP. In older version of Liferay it was easy to include static resource like CSS , JS and Images as part of portlet but with Liferay DXP you have to do few additional changes to include them.

First of all you need to add webcontext path in your modules bnd file.

Web-ContextPath: /my-custom-portlet

Read more »

How to include custom portlet in theme - Liferay DXP

Leave a Comment
How to include custom portlet in theme You can include out of box as well as custom portlet inside theme in Liferay dxp but way has been changed.

By default Liferay uses free marker templates for theme. You can use below snippet to include any custom portlet in theme.

Read more »

How to specify external jar dependency in Liferay DXP

Leave a Comment
How to specify external jar dependency in Liferay DXP While doing development in Liferay DXP your module may depends on external jar files . If required jar file is available in Liferay Nexus Repository then you can include them by using BND and Gradle file.

You can see Liferay nexus repository configured in your settings.gradle file under repository tag.

repositories {
maven {
url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
}
mavenLocal()

Read more »

How to specify module dependencies in Liferay DXP

Leave a Comment
How to specify module dependencies in Liferay DXP Best advantages of using OSGi is that you can divide your components in small micro services and as when required module's can use each other's services.

Let say if you have module A which depends on module B then can specify module dependency in bnd.bnd file of module A as below.

compileOnly project(":modules:test-module-a")

Read more »

How to disable re-indexing of all Journal Article Versions in Liferay DXP

Leave a Comment
In case if you have to turn off re indexing all Journal Article version then you can do this by placing below property in portlet-ext properties file. Yes its portlet-ext.properties not portal.properties.

#
# Set this to true to index all article versions. Set this to false to index
# only the last indexable version.
#
journal.articles.index.all.versions=false

Read more »

Previous PostOlder Posts Home