Fórum
Customizing breadcrumbs in theme
A G, modificado 7 Anos atrás.
Customizing breadcrumbs in theme
New Member Postagens: 14 Data de Entrada: 01/02/17 Postagens Recentes
Hi all.
I want to build a custom display for breadcrumbs in Liferay 7. I have discovered that I can do it with ADTs. In fact, I have created one from Liferay Portal UI.
I have configured one breadcrumb portlet in one of my pages and the breadcrumbs are correctly displayed according with the ADT.
The problem appears when I include the breadcrumb in portal-normal.ftl in this way: <@liferay.breadcrumbs />
I don´t know what I have to do to show the breadcrumb with the ADT visualization I have just created.
I have been looking for solutions in many web pages, but I haven't found anything. I ' m a beginner in Liferay and I 'm completely lost.
Could you please help me?
Thank you very much
I want to build a custom display for breadcrumbs in Liferay 7. I have discovered that I can do it with ADTs. In fact, I have created one from Liferay Portal UI.
I have configured one breadcrumb portlet in one of my pages and the breadcrumbs are correctly displayed according with the ADT.
The problem appears when I include the breadcrumb in portal-normal.ftl in this way: <@liferay.breadcrumbs />
I don´t know what I have to do to show the breadcrumb with the ADT visualization I have just created.
I have been looking for solutions in many web pages, but I haven't found anything. I ' m a beginner in Liferay and I 'm completely lost.
Could you please help me?
Thank you very much
Byran Zaugg, modificado 7 Anos atrás.
RE: Customizing breadcrumbs in theme
Expert Postagens: 252 Data de Entrada: 06/04/12 Postagens Recentes
You'll want to set the portlet properties on breadcrumbs, to load your custom ADT.
I believe like this:
See the LDN article, Embedding Portlets in Themes and Layout Templates.
I believe like this:
<#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
<#assign VOID = freeMarkerPortletPreferences.setValue("displayStyle", "MY_TLD_ID") />
<@liferay_portlet["runtime"]
defaultPreferences="${freeMarkerPortletPreferences}"
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry"
/>
<#assign VOID = freeMarkerPortletPreferences.reset() />
See the LDN article, Embedding Portlets in Themes and Layout Templates.
A G, modificado 7 Anos atrás.
RE: Customizing breadcrumbs in theme
New Member Postagens: 14 Data de Entrada: 01/02/17 Postagens Recentes
Thank you for the answer Byran
I have tried it, but it didn´t work.: I`ve copied the code you wrote , only changing the ADT id in the displayStyle value, but the breadcrumb style didn´t change, it was the default one. I´ve also tried with the Template Key , but I had the same result. It seems that defaultPreferences are not taken into account.
This is the code I used:
I am completely lost. I don´t know what i´m doing wrong.
I have been working a lot of time in this issue but I cant find a solution
Do you have any other ideas of what is happening? My Liferay version is 7.0 GA3
Thank you very much.
I have tried it, but it didn´t work.: I`ve copied the code you wrote , only changing the ADT id in the displayStyle value, but the breadcrumb style didn´t change, it was the default one. I´ve also tried with the Template Key , but I had the same result. It seems that defaultPreferences are not taken into account.
This is the code I used:
<#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
<#assign VOID = freeMarkerPortletPreferences.setValue("displayStyle", "36706") />
<@liferay_portlet["runtime"]
defaultPreferences="${freeMarkerPortletPreferences}"
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry"
/>
<#assign VOID = freeMarkerPortletPreferences.reset() />
I am completely lost. I don´t know what i´m doing wrong.
I have been working a lot of time in this issue but I cant find a solution
Do you have any other ideas of what is happening? My Liferay version is 7.0 GA3
Thank you very much.
Byran Zaugg, modificado 7 Anos atrás.
RE: Customizing breadcrumbs in theme
Expert Postagens: 252 Data de Entrada: 06/04/12 Postagens Recentes
I don't, sorry. I'm not very familiar with configuring embedded portlets.
A G, modificado 7 Anos atrás.
RE: Customizing breadcrumbs in theme
New Member Postagens: 14 Data de Entrada: 01/02/17 Postagens Recentes
Ok, thanks anyway
If any of you know how to solve this problem, please tell me. I can´t find a solution.
Thanks in advance!
If any of you know how to solve this problem, please tell me. I can´t find a solution.
Thanks in advance!
Marco Endres, modificado 7 Anos atrás.
RE: Customizing breadcrumbs in theme
Regular Member Postagens: 112 Data de Entrada: 22/08/12 Postagens Recentes
This wokred for me:
You can change the default one in the configurations. Also maybe you need to create a new page, because you have already overridden the defaultconfig on the current page you are trying.
good luck
Greetings
Marco Endres
<#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone")>
<nav id="breadcrumbs">
<@liferay.breadcrumbs default_preferences="${freeMarkerPortletPreferences}" />
</nav>
<#assign VOID = freeMarkerPortletPreferences.reset()>
You can change the default one in the configurations. Also maybe you need to create a new page, because you have already overridden the defaultconfig on the current page you are trying.
good luck
Greetings
Marco Endres