留言板

RE: Breadcrumbs and home page linked twice

thumbnail
Simon Youngs,修改在11 年前。

Breadcrumbs and home page linked twice

Junior Member 帖子: 25 加入日期: 11-7-12 最近的帖子
Hi,

I am looking for ideas on how to resolve a issue we are have with Liferay breadcrumbs and Liferay's behaviour with the home page of a site.

When you create a new site, and create a new home page for that site (called home in this example) , you can access that page from two urls. http://......./web/site and http://......./web/site/home this also happens with the breadcrumbs. .../site and ../site/home Is there anyway to stop this behaviour so that the home page for a site is not available from two url's and does not create two links in the breadcrumbs.

Any help great fully appreciated

Regards

Simon
thumbnail
Sandeep Nair,修改在11 年前。

RE: Breadcrumbs and home page linked twice

Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
Hi Simon,

You can all together remove the breadcrumb from the theme if you dont want it. To remove it from theme. Go to your theme -->_diffs-->templates--> portal_normal.vm and open that file

You can remove these following lines to remove the breadcrumb


<nav class="site-breadcrumbs" id="breadcrumbs">
			<h1>
				<span>#language("breadcrumbs")</span>
			</h1>

			#breadcrumbs()
		</nav>


The behaviour that you see when you click on ./web/site and ./web/site/home is what it will be, since home is the first page of the site.

Regards,
Sandeep
thumbnail
Tejas Kanani,修改在11 年前。

RE: Breadcrumbs and home page linked twice

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

There is one way by which you can change it for Breadcrumb to now show Parent Group.
Lets say if my site name is LR and home page name is welcome then breacrumb will look like
liferay.com --> LR --> Welcome

So we have three different group here.
liferay.com - Guest group
LR - Site group (Parent Group)
Welcome - Current page

Now if you want to remove liferay.com from breadcrumb you just have to add below property in portal-ext.properties.

#
# Set this to true to show the Guest community as the top level parent in
# the breadcrumbs. It will only show if it has at least one page.
#
breadcrumb.show.guest.group=[b]false[/b]


And if you want to remove LR(Parent Group), just add below property in portal-ext.properties.

#
# Set this to true to show the path of parent communities or organizations
# in the breadcrumbs. An community or organization will only be shown if it
# has at least one page.
#
breadcrumb.show.parent.groups=[b]false[/b]


And regarding change the behavior, As Sandeep mentioned its Liferay OOTB normal behavior so I don't think it will be easily modifiable.

Regards,
TK
thumbnail
Simon Youngs,修改在11 年前。

RE: Breadcrumbs and home page linked twice

Junior Member 帖子: 25 加入日期: 11-7-12 最近的帖子
Hi Guys,

Many thanks for your replies confirming the behaviour of Liferay OOTB for Home pages, I think I will be leave this behaviour alone.

I found this message on the forums about altering the buildLayoutBreadcrumb function in init.jsp for breadcrumbs in an EXT, so that the final item in the breadcrumb for the page that you are on is displayed as plain text and not a link. I am going to investigate this option further and also list this feature as a request for a portal.properties setting with Liferay to complement the other settings for breadcrumbs you mentioned.

http://www.liferay.com/community/forums/-/message_boards/message/11474915

Thanks once again.

Simon

Sandeep. looks like you enjoyed Universal Studios. :-)