New guy here. Can someone explain what the proper way to pass a variable into an include? I'm using this:
{% include "singlepage" with { currentPage:'leaders' } %}
.. and I'm getting a Variable "currentPage" does not exist error.
In short, I have a template that I want to use for my singles pages, but I need to set a couple of variables for the template to use. So, I have a template for each single that simply sets the current page and then includes the single page template. Is this a good approach?
Thanks for any help.