留言板

Regarding Breadcrum

vasudha karri,修改在11 年前。

Regarding Breadcrum

New Member 帖子: 17 加入日期: 12-5-3 最近的帖子
Hi
I want to add H1 tag to the last page in the breadcrum every time .How can i achieve it.Also i when i am navigating through the pages ,i want parent pages of that page should get the hyperlink in the breadcrum but not to the page in which i am present.Any help is really appreciated.

Thanks & Regards
K.Vasudha
thumbnail
jaid shaik,修改在11 年前。

RE: Regarding Breadcrum

Regular Member 帖子: 171 加入日期: 10-10-8 最近的帖子
Hi vasudha,

For this better go with breadcrumb hook
I created breadcrumb hook under display_style_2.jsp file I modified.
and check breadcrumb configaration.





Thanks
Jaid.Shaik
vasudha karri,修改在11 年前。

RE: Regarding Breadcrum

New Member 帖子: 17 加入日期: 12-5-3 最近的帖子
hi jaid


could u please elaborate the reply and what exact modifications that i need to do?

Thanks & Regards

K vasudha
vasudha karri,修改在11 年前。

RE: Regarding Breadcrum

New Member 帖子: 17 加入日期: 12-5-3 最近的帖子
hi jaid

i dint find this display_style_1.jsp file in my liferay6.1.0. but i found display_style_horizontal.jsp,display_style_vertical.jsp these two jsp files in the following path \ROOT\html\taglib\ui\breadcrumb.so Which jsp i need to override and what modifications i need to do in that file.Your help is really appreciated

Thanks & Regards
Vasudha
thumbnail
Tejas Kanani,修改在11 年前。

RE: Regarding Breadcrum (答复)

Liferay Master 帖子: 654 加入日期: 09-1-6 最近的帖子
Hi Vasudha,

You need to modify init.jsp of breadcrumb taglib.
Please find attached modified html\taglib\ui\breadcrumb\init.jsp. And below are the modification(bolded) in _buildLayoutBreadcrumb method.
So just create one hook and add attached modified init.jsp and deploy it. you are done !!!


if (selLayout.isTypeControlPanel()) {
	layoutURL = HttpUtil.removeParameter(layoutURL, "controlPanelCategory");
}

[b]breadcrumbSB.append("<li>");
	
if(selLayout == themeDisplay.getLayout())
{
	breadcrumbSB.append("<span style="font-size:1.8em">");
	breadcrumbSB.append(HtmlUtil.escape(selLayout.getName(themeDisplay.getLocale())));
	breadcrumbSB.append("</span>");
} else
{ 
	breadcrumbSB.append("<span><a href="\&quot;&quot;);" breadcrumbsb.append(layouturl); breadcrumbsb.append("\" "); if (sellayout.istypecontrolpanel()) { breadcrumbsb.append(" target="\&quot;_top\&quot;&quot;);" } else breadcrumbsb.append(target);>");

	breadcrumbSB.append(HtmlUtil.escape(selLayout.getName(themeDisplay.getLocale())));

	breadcrumbSB.append("</a></span>");
}
	
breadcrumbSB.append("</li>");[/b]

Layout layoutParent = null;


Note: As there are some issues if we put <h1> tag for last breadcrumb entry. Somehow its not visible in breadcrumb so you can change in font-size same as h1 has. I've done the same thing in my code

Hope this is what you are looking for.

Thanks,
TK
vasudha karri,修改在11 年前。

RE: Regarding Breadcrum

New Member 帖子: 17 加入日期: 12-5-3 最近的帖子
Hi Tejas
It worked fine.Thank u

Thanks & Regards
K Vasudha