Want to add fix content via custom ftl template in Liferay 7/DXP.
Below is the sample code,
Below is the sample code,
Make sure you provide the groupId of the site in which you have created web content.Code to embed web content in theme :
<#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
<#assign theme_groupID = htmlUtil.escape(theme_display.getCompanyGroupId()?string) />
<#assign VOID = freeMarkerPortletPreferences.setValue("groupId", '${group_id}') />
<#assign VOID = freeMarkerPortletPreferences.setValue("articleId", "yourarticleid") />
<@liferay_portlet["runtime"]
defaultPreferences="${freeMarkerPortletPreferences}"
portletProviderAction=portletProviderAction.VIEW
instanceId="footercontent"
portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" />
${freeMarkerPortletPreferences.reset()}