Im trying to add Seo friendly pagination. This means I need two tags in the head section (For example if I was on page 2)
<link rel="prev" href="myurl?page=1" />
<link rel="next" href="myurl?page=3" />
But my pagination is part of a controller rendering. So I cant figure out how to update these tags from the controller. I need to hide the prev tag on the first page and hide the next tag on the last page. I need to hide both if the results only end up being one page. Some of my paging is server side, and some is client side. Regardless I can really only see how to do this with Javascript. The place where I know the current page and the if I am on the last page is in the controller which does not seem to have access to the head tag. I could have it be its own rendering tied to a page, but that means the page needs to know it has some sort of paged control on it, and I still down see how to know which page its on at any given time. I can get the current page from the query string, but that doesnt help to know if its the last page or not.