Separate Forms#
Give each search a name, then bind each query to the matching name:
{{ search name="articles" param="article_q" }} <input type="search" placeholder="Search articles"> <button>Search</button>{{ /search }}{{ query:posts search="articles" }} <h2><a href="{{ url }}">{{ title }}</a></h2>{{ /query:posts }}{{ search name="projects" param="project_q" }} <input type="search" placeholder="Search projects"> <button>Search</button>{{ /search }}{{ query:project search="projects" }} <h2><a href="{{ url }}">{{ title }}</a></h2>{{ /query:project }}Different URL parameters keep the two searches from overwriting each other.
Reuse One Search#
Two queries can use the same search when that is the desired behavior:
{{ query:posts search="site" }}{{ query:page search="site" }}Both queries read the same keyword from the search named site.