Not Found (404)

Trigger a 404 response.


This tag will trigger a 404 status code and show your 404 template, without changing the URL.

For performing a redirect, use the Redirect Tag.

Example

In this example, we will trigger a 404 if there are no results in a collection.

{{ collection:blog as="posts" }}
    {{ if no_results }}
        {{ 404 }}
    {{ /if }}

    {{ posts }}
        <div class="post">{{ title }}</div>
    {{ /posts }}
{{ /collection:blog }}
Last modified on September 11, 2016