Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Simon Youngs
Breadcrumbs and home page linked twice
June 21, 2012 5:40 AM
Answer

Simon Youngs

Rank: New Member

Posts: 21

Join Date: July 12, 2011

Recent Posts

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
Sandeep Nair
RE: Breadcrumbs and home page linked twice
June 21, 2012 9:38 PM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

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

1
2<nav class="site-breadcrumbs" id="breadcrumbs">
3            <h1>
4                <span>#language("breadcrumbs")</span>
5            </h1>
6
7            #breadcrumbs()
8        </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
Tejas Kanani
RE: Breadcrumbs and home page linked twice
June 22, 2012 12:49 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

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.
1
2#
3# Set this to true to show the Guest community as the top level parent in
4# the breadcrumbs. It will only show if it has at least one page.
5#
6breadcrumb.show.guest.group=[b]false[/b]


And if you want to remove LR(Parent Group), just add below property in portal-ext.properties.
1
2#
3# Set this to true to show the path of parent communities or organizations
4# in the breadcrumbs. An community or organization will only be shown if it
5# has at least one page.
6#
7breadcrumb.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
Simon Youngs
RE: Breadcrumbs and home page linked twice
June 22, 2012 2:08 AM
Answer

Simon Youngs

Rank: New Member

Posts: 21

Join Date: July 12, 2011

Recent Posts

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. :-)