Forum Discussion

Dries Verdonckt's avatar
Dries Verdonckt
Copper Contributor
Mar 27, 2017

ID (or other attributes) linked to next search item

Hi,

 

I need to create some display templates for SharePoint and when a user clicks on an item, shows a preview in a lightbox (no problem here). Now the user should be able to see the preview of the next/previous search item directly by using his arrow buttons.

 

Example:

  1. end-user clicks on search result b, system opens a preview lightbox
  2. when he clicks his right arrow, the system shows the preview lightbox of result c
  3. he clicks again right arrow and the system shows the preview lightbox of result d
  4. etc. etc.

 

My question: how can i know what the ID is (or another attribute) from my next search item. I think i have to pass this from my item display template to my control display templates, but still searching how i'm able to do this.

 

Thanks in advance!

Dries

Resources