Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 216820

Summary: [navigation] Please add breadcrumb like navigation on eclipse.org
Product: Community Reporter: Andrey Loskutov <loskutov>
Component: WebsiteAssignee: Denis Roy <denis.roy>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chris.guindon, edouard, ian.skerrett, mike.milinkovich, nathan
Version: unspecified   
Target Milestone: 2014-Q2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to implement breadcrumbs
none
eclipse_org_common-adding_removeCrumb.patch none

Description Andrey Loskutov CLA 2008-01-28 15:52:43 EST
Recently I have to find "tech awards" page starting at the Eclipse.org root page and I didn't find a simple way to do it. I think I'm not alone and it is not related to the specific page, it'a general problem.

Ok, we have Google, so I've googled for the awards page url:

http://www.eclipse.org/org/foundation/eclipseawards/technology_nominations.php

On this page, how one can know to which "top" page it belongs to???
No one link on this page leads me to the next "upper" level page/project. I have no idea to which "area" or project of Eclipse.org it belongs and how I can find it again (if not using Google).

Ok, we are smart engineers, we can reverse engineer the url and try to use:
http://www.eclipse.org/org/foundation/eclipseawards/
...?...
Nice try, I see the link "down" to the "tech awards" page but there is still no link "up" to the "root" page.

Another step up:
http://www.eclipse.org/org/foundation/
...???...
Ok, I see now something the page is saying something about "Eclipse Foundation", but now I'm completely lost: neither a link to "awards" page exists, nor I know where is the link "up" to the root.

Next step up:
http://www.eclipse.org/org/
... Yea!!?? WTF??? 
In difference to the previous "Eclipse Foundation" the page is named now "About the Eclipse Foundation"... What *is* the difference?!? Finally I see the link down to the "Eclipse Foundation" and I realize that "About" at the top navigation menu was related to the "About Us" on the left navigator pane.

Why the pages can't just have a clickable "breadcrumb" navigation at the top / bottom to help us to navigate within the Eclipse.org universe?

For org/foundation/eclipseawards/technology_nominations url it would look like:

about-> foundation -> eclipseawards -> technology_nominations

Isn't easier to use & to understand?
Comment 1 Denis Roy CLA 2008-01-28 16:08:23 EST
Moving to the website.

I hear you -- we definitely need breadcrumbs.  When we redesigned our site ages ago, we discussed breadcrumbs but didn't come up with an easy way to define/manage them (other than manually) and the issue simply never resurfaced.
Comment 2 Denis Roy CLA 2008-05-09 08:37:59 EDT
I think the directory structure of our site is stable and well defined to the point where we can make this happen at run-time by simply examining the URL and building a breadcrumb in one of our classes.

For instance, 

eclipse.org/webtools/...  then:
Home > Projects

eclipse.org/legal/ ...  then:
Home > About Us > Foundation > Legal

eclipse.org/membership/... then:
Home > About Us > Foundation > Membership

etc...

I'll target this for a Q3 deliverable.  I have ideas.
Comment 3 Denis Roy CLA 2008-08-26 13:29:25 EDT
Retargetting... 
Comment 4 Denis Roy CLA 2009-03-10 16:54:22 EDT
Retargetting ... I still have ideas.

Nathan, do we have pixels for this in the Nova skin?
Comment 5 Denis Roy CLA 2009-04-27 15:45:30 EDT
> Nathan, do we have pixels for this in the Nova skin?
Comment 6 Nathan Gervais CLA 2009-04-27 16:25:12 EDT
I'm sure we could fit this into the skin, definitely not this quarter tho.

Setting Q4-2009 as tentative Target.
Comment 7 Denis Roy CLA 2014-04-02 15:28:20 EDT
If you've seen our staging website, you'll notice breadcrumbs are part of the skin.

http://staging.eclipse.org/projects/

I'll provide Phoenix API similar to what's done with $Nav and $Menu, in that breadcrumbs will be set (an array of breadcrumb objects) and altered by a page, or via _projectCommon
Comment 8 Denis Roy CLA 2014-04-10 08:31:28 EDT
*** Bug 432475 has been marked as a duplicate of this bug. ***
Comment 9 Denis Roy CLA 2014-04-16 15:06:41 EDT
Created attachment 242069 [details]
Patch to implement breadcrumbs

Here's my first pass.  The Breadcrumb class is nothing more than an array of Link() object, which, in turn, are composed of a Title, URL, Target (_self, _blank, etc) and an arbitrary level which is not used elsewhere.


I assume this will be called from header.php or something similar, just like we call Menu(). A sample implementation would look like this:

$pageTitle 		= "Eclipse newsgroups";

# Automatically generate breadcrumbs based on $_SERVER['PHP_SELF']
$B = new Breadcrumb();

# Let's insert a silly breadcrumb just because we can
$B->insertCrumbAt(1, "Test", "sometest.php", "_self");

# Let's see what the breadcrumbs are
# $Crumb is a Link object
foreach ($B->getCrumbList() as $Crumb) {
  echo "<a href='" . $Crumb->getURL() . "'>" . $Crumb->getText() . "</a>";
  echo " | " ;
}

If called by www.eclipse.org/newsgroups/test.php, you will obtain:

Home | Test | Forums | Eclipse newsgroups
 ^     ^^^^   ^^^^^^   ^^^^^^^^^^^^^^^^^^
 |     |      |        `- The last crumb will yield a NULL getURL() and
 |     |      |         - should only be rendered as text. Value of $pageTitle
 |     |      |         - truncated to 35 characters
 |     |      |
 |     |      `-- Breadcrumb class mapped /newsgroups to "Forums" text.
 |     |
 |     ` - The silly breadcrumb we decided to insert
 |
 ` - Home is always Breadcrumb(0) in the list.
Comment 10 Denis Roy CLA 2014-04-16 16:30:06 EDT
I've pushed the breadcrumbs.class.php file to staging:

http://git.eclipse.org/c/www.eclipse.org/eclipse.org-common.git/commit/?h=staging&id=5eae66c20bfcbe25e2ca951cbefb323eebdea441
Comment 11 Christopher Guindon CLA 2014-04-16 21:14:44 EDT
Created attachment 242077 [details]
eclipse_org_common-adding_removeCrumb.patch

(In reply to Denis Roy from comment #10)
> I've pushed the breadcrumbs.class.php file to staging:
> 
> http://git.eclipse.org/c/www.eclipse.org/eclipse.org-common.git/commit/
> ?h=staging&id=5eae66c20bfcbe25e2ca951cbefb323eebdea441

Looks good Denis!

I implemented this to the new solstice theme:
http://git.eclipse.org/c/www.eclipse.org/eclipse.org-common.git/commit/?h=staging&id=4dd2e8b6cbd11b2ac4612b16ab35104c8c8b026a

We will need to update $FirstLevel array to include everything that's not a project. 

For example, a page under legal includes a link to /projects:
http://staging.eclipse.org/legal/privacy.php

Home > Project > legal > Eclipse.org Privacy Policy


I am also thinking we might want to be able to remove a link from the breadcrumbs. I am attaching a patch for this.
Comment 12 Denis Roy CLA 2014-04-17 15:58:50 EDT
+1!
Comment 13 Christopher Guindon CLA 2014-04-29 11:45:25 EDT
(In reply to Denis Roy from comment #12)
> +1!

I added my patch.

I also updated the $FirstLevel array.

Removing block #432342 since this functionality is ready for Solstice.

Example:

http://staging.eclipse.org/legal/termsofuse.php
Comment 14 Denis Roy CLA 2015-02-12 11:37:01 EST
I am happy to report that we have breadcrumbs on eclipse.org.
https://eclipse.org/eclipse.org-common/themes/solstice/docs/#section-breadcrumbs