组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Simon Youngs
Breadcrumbs and home page linked twice
2012年6月21日 上午5:40
答复

Simon Youngs

等级: New Member

帖子: 21

加入日期: 2011年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
Sandeep Nair
RE: Breadcrumbs and home page linked twice
2012年6月21日 下午9:38
答复

Sandeep Nair

等级: Liferay Legend

帖子: 1691

加入日期: 2008年11月5日

最近的帖子

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
2012年6月22日 上午12:49
答复

Tejas Kanani

等级: Liferay Master

帖子: 654

加入日期: 2009年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.
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
2012年6月22日 上午2:08
答复

Simon Youngs

等级: New Member

帖子: 21

加入日期: 2011年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. :-)