Message Boards

Back

Show web content in the navigation.ftl

Toggle
Show web content in the navigation.ftl
Answer
7/28/20, 11:43 PM
Hello,

We would like to embed a portlet of web content in the file navigation.ftl.
 

You have already send us a code to include a portlet for selecting the language:
(<@liferay_portlet["runtime"] portletProviderAction=portletProviderAction.VIEW portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.LanguageEntry"/>

 And now we need something similar to show in navigation.ftl the content using its identifier or name.
name:"agents_single_page"
id:"AGENTS_SINGLE_PAGE"

We would appreciate if you can help us with this. 
Thank you.

Kind regards,
Laura Alemany
0 (0 Votes)

RE: Show web content in the navigation.ftl
Answer
7/29/20, 3:13 AM as a reply to Laura.
Hello,
Yes you can add this code to your navigation file


<#assign preferences = freeMarkerPortletPreferences.getPreferences("articleId", "AGENTS_SINGLE_PAGE")><@liferay_portlet["runtime"]defaultPreferences="${preferences}"portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" instanceId="agents"/> 
0 (0 Votes)