TryGhost/Ghost — pull request #1562 by niedbalski (2013-11-25 16:43:55+00:00)
Title: [Feature] added has_any_tag and has_all_tags core filters to Theme API

Continuation of #1539 pull request (has_tag (single tag) )

* Added has_all_tags (AND) helper to core Helpers.
* Added has_any_tag (OR) helper to core Helpers.
* Added unit tests to check works as expected.

This patch adds functionality to support the following use cases:

```html

{{#has_all_tags "summer of code" "snippet"}}

{{content}}

{{ else }}

{{excerpt}}…

{{/has_all_tags}}

```

```html

{{#has_any_tag "snippet" "code" "programming" }}

{{content}}

{{ else }}

{{excerpt}}…

{{/has_any_tag}}

```

This could be pretty useful to filter post types using tags.