Skip to content

Instantly share code, notes, and snippets.

@ps-team
Created October 27, 2017 09:33
Show Gist options
  • Save ps-team/70ee688bab7162bf35b3a0a2ccf3f750 to your computer and use it in GitHub Desktop.
Save ps-team/70ee688bab7162bf35b3a0a2ccf3f750 to your computer and use it in GitHub Desktop.
These example show passing search parameters either form the query string or a from posted data to a node query
<control name="News Listing Using Node Query" showInMenu="true" category="Dev Training" viewingGroup="1">
<properties>
<nodeQuery name="NewsArticlesQuery" orderby="Property_DatePublished desc">
<where property="Type" operator="IsEqualTo" value="News" />
<and property="Title" operator="Contains" value="@Request.Querystring.Keywords" />
<and property="Data.TaxonomyCategories" operator="Contains" value="@Request.Querystring.category" />
</nodeQuery>
</properties>
</control>
<control name="News Listing Using Node Query" showInMenu="true" category="Dev Training" viewingGroup="1">
<properties>
<nodeQuery name="NewsArticlesQuery" orderby="Property_DatePublished desc">
<where property="Type" operator="IsEqualTo" value="News" />
<and property="Title" operator="Contains" value="@Request.Form.Keywords" />
<and property="Data.TaxonomyCategories" operator="Contains" value="@Request.Form. categoryFilter" />
</nodeQuery>
</properties>
</control>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment