TroyGoode/PagedList — pull request #65 by ajbeaven (2013-09-02 23:16:52+00:00)
Title: Add link metadata to transform page link delegate

Now the transform page link delegate has access to things such as the current page, total page number, the target page, etc.

This was useful for me because I wanted to add the target page number in a data attribute on all pagination links including next, first, etc. Could be helpful for Issue #54.

```
public static PagedListRenderOptions AddTargetPageDataAttribute
{
get
{
return new PagedListRenderOptions
{
FunctionToTransformEachPageLink = (targetPageNumber, list, liTagBuilder, aTagBuilder) =>
{
if (targetPageNumber.HasValue)
aTagBuilder.Attributes.Add("data-target-page", targetPageNumber.ToString());

liTagBuilder.InnerHtml = aTagBuilder.ToString();
return liTagBuilder;
}
};
}
}
```

Thanks so much for the time and effort you've spent on this repo, @TroyGoode. It's an awesome resource. Keep up the great work :)