When I log the passed params, I find that params.title gets a fixed value (probably uses the first value of .LinkTitle as a constant?) and does not vary from Page to Page. While I have often used site variables as params and everything works as expected. But I find that using local (Page) variables as params does not work. Am I using $opts incorrectly?
Ahhhhh, DOH! Of course.
Thank you so much for explaining. The key fact I missed was that .RelPermalinkof the built file is the same for every page!!! This familiarity bias that anything called RelPermalink changes from page to page
I agree - reading it from the DOM would be so much more efficient.