A developer can call Liferay services in the content template to access the Liferay Portal database. Before they can call those Liferay services, they should first set the following properties in the
portal-ext.properties file and restart the Liferay Portal instance as shown in the following code:
This setting makes it so that the developer is not restricted from using any variables in the Velocity or Freemarker contexts, including the Liferay service variables.
Suppose a company's website has a page for the description of their Chief Executive Officer (CEO). The CEO's data is saved in the database. We will create a piece of web content to ...