guardian/frontend — pull request #6785 by robertberry (2014-10-27 18:35:46+00:00)
Title: Data link name fixes

This fixes two issues with data-link-name on fronts:

### Position of container

Previously link names would only contain the container name itself, not its position on the page. It is now 1-indexed, so links to articles with have a data-link-name such as `front | /uk | 1 | headlines | analysis | 1 | article`, which means you've clicked on an analysis article in the first position of the headlines container, which is in the first position of the uk front.

### Sublinks

Previously sublinks were not getting their own data-link-name separate from the article's own. Now you get the sublink position, such as `front | /uk | 1 | headlines | analysis | 1 | sublinks | 1`, meaning you've clicked the 1st sublink on an analysis article in the 1st position of the headlines container which is in the first position of the uk front.

CC @crifmulholland @gklopper @phamann

NOTE!

I've also added some debugging stuff for `data-link-name`, which I imagine might be contentious. If so, I'm happy to move it out of this pull request. Basically, on dev machines, it creates a GuardianDebug object which has a function you can call to replace the titles of links with their data-link-name. This makes it a lot easier to debug at a glance data link names on a front, which I needed for testing.

![hello](https://cloud.githubusercontent.com/assets/1001642/4796997/063fed4e-5e08-11e4-8957-f574c6bd17a2.png)