I am building a people results in display template that needs to include a link to an individual's CV in a document library. I've used a SPServices Getlistitem to query the list, but I can't get the CurrentItem data to work in a CAML query. What I need to do is something like the below (which isn't working):
CAMLQuery: "<Query><Where><Contains><FieldRef Name='LinkFilename' /><Value Type='Text'>_#= ctx.CurrentItem.PreferredName =#_</Value></Contains></Where></Query>"
Any suggestions as to what I'm doing wrong or if this is even possible?