Fórum
Customize breadcrumb portlet
Raja Seth, modificado 9 Anos atrás.
Customize breadcrumb portlet
Regular Member Postagens: 233 Data de Entrada: 18/08/11 Postagens Recentes
Hi All,
I need to customize Breadcrumb portlet in such a way that Parent page should not be click-able in case of it contains sub pages or child pages. I tried to debug liferay-src code and found that there is BreadcrumbTag.java in which this breadcrumb gets created.
Just need to confirm, is there any other way of customizing breadcrumb portlet or this is the correct way I am going through?
Thanks & Regards,
Raja
I need to customize Breadcrumb portlet in such a way that Parent page should not be click-able in case of it contains sub pages or child pages. I tried to debug liferay-src code and found that there is BreadcrumbTag.java in which this breadcrumb gets created.
Just need to confirm, is there any other way of customizing breadcrumb portlet or this is the correct way I am going through?
Thanks & Regards,
Raja
Samuel Kong, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet
Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens Recentes
Correct. But note that any changes you make to the breadcrumb tag, will affect all portlets that uses the taglib and not just the Breadcrumb portlet. So you may want to pull out the relevant logic from the breadcrumb tag and make your changes in /html/portlet/breadcrumb/view.jsp.
Raja Seth, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet
Regular Member Postagens: 233 Data de Entrada: 18/08/11 Postagens Recentes
Hi Samuel,
Thanks for your reply. In view.jsp, the code is as given below
I am not able to get how would I override the breadcrumb which is created. My scenario it's like, Home / Profile / Performance, in which 'Profile' should not have <a> tag. For this what I came to conclude that it wouldn't be possible through jsp. It would be possible through BreadcrumbTag.java. Please correct me if I am wrong. Also please share what can be done to achieve my query if we just need to modify jsp.
Thanks & Regards,
Raja
Thanks for your reply. In view.jsp, the code is as given below
<liferay-ui:breadcrumb displayStyle="<%= displayStyle %>" showCurrentGroup="<%= showCurrentGroup %>" showCurrentPortlet="<%= showCurrentPortlet %>" showGuestGroup="<%= showGuestGroup %>" showLayout="<%= showLayout %>" showParentGroups="<%= showParentGroups %>" showPortletBreadcrumb="<%= showPortletBreadcrumb %>" />
I am not able to get how would I override the breadcrumb which is created. My scenario it's like, Home / Profile / Performance, in which 'Profile' should not have <a> tag. For this what I came to conclude that it wouldn't be possible through jsp. It would be possible through BreadcrumbTag.java. Please correct me if I am wrong. Also please share what can be done to achieve my query if we just need to modify jsp.
Thanks & Regards,
Raja
Samuel Kong, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet (Resposta)
Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens Recentes
If you make a change in BreadcrumbTag, this change will appear anywhere the breadcrumb tag is used. If you want to do it this way, you can. However, if you only want to change the Breadcrumb Portlet, you'll need to extract the relevant logic from BreadcrumbTag and place them in view.jsp.
Raja Seth, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet
Regular Member Postagens: 233 Data de Entrada: 18/08/11 Postagens Recentes
Thanks Samuel!
I guess you mean that I need to write the whole logic of creating breadcrumb in view.jsp. Am I right?
I guess you mean that I need to write the whole logic of creating breadcrumb in view.jsp. Am I right?
Jan Geißler, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet
Liferay Master Postagens: 735 Data de Entrada: 05/07/11 Postagens Recentes
Jep. That's the way.
Raja Seth, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet
Regular Member Postagens: 233 Data de Entrada: 18/08/11 Postagens Recentes
Thanks Samuel & Jan!
Samuel Kong, modificado 9 Anos atrás.
RE: Customize breadcrumb portlet
Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens RecentesRaja Seth:
I guess you mean that I need to write the whole logic of creating breadcrumb in view.jsp. Am I right?
Correct