API Questions on Kentico API.
Version 6.x > API > Previous and Next Page Links View modes: 
User avatar
Member
Member
tfoulk - 3/29/2013 3:09:20 PM
   
Previous and Next Page Links
I am new to Kentico.

I am trying to implement rel="next" and rel="prev".

Can I do this by accessing the pager transformation 'General-NextPage' or 'General-PreviousPage'?

If not can you point me in the right direction?

Thanks!

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/30/2013 3:40:08 AM
   
RE:Previous and Next Page Links
Hello,

I'm not pretty sure if I understand what do you want to achieve but in general yes, the easiest way it to implement this functionality by modyfing the Universal Pager Transformations ... Previous page transformation and Next page transformation.

Best regards,
Martin Danko

User avatar
Member
Member
tfoulk - 4/1/2013 8:35:36 AM
   
RE:Previous and Next Page Links
Thank you for getting back so quickly, but I think I was unclear.

I started with the Universal Pager Transformation, but
<link rel="next" href="http://www.example.com/article?page=2" />
is supposed to go in the <head> of the page.

Is there a way to access 'PreviousURL' or 'NextURL' from the Pager transformation and insert it in the <head> for specific pages?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 4/5/2013 11:47:35 PM
   
RE:Previous and Next Page Links
Hi,

In my understading of your issue I dont think it is possible with a build-in functionality. I mean - you have implemented the previous and next link in your pager transformation and is working just fine, is that correct? However when a user clicks next you want some information to be added in the HeadSection of the whole page (e.g. you want probably some script know in the head section that you are on page 3 or something like that..)?

If this would be the case I think it might be done using query string macros. In the Head section of your page you would check for a certain page and its query string "page" and according that printed out the value of the "page". For using macros please see this article.

Kind regards,
Richard Sustek

User avatar
Member
Member
tfoulk - 4/9/2013 8:45:42 AM
   
RE:Previous and Next Page Links
Thanks Richard you are 100% correct. I will try to explain it better next time.

I will take a look at that article.