334

Product support

Get help in the plugin support forum.

Categories

oc-checkcontent

Check if content file exists

Usage:

Prevent error if choosing non-existing content file (and use :slug instead of content file name)

{% if content_exists( this.param.slug ~ '.htm') %}
    {% content this.param.slug %}
{% else %}
    {% content 'default' %}
{% endif %}

Checkcontent

Check if content file exists (with a small modification you can check existence of any file from October file system)

Use :slug instead of content file name One universal page for all contents you have:

/page/:slug

{% if content_exists( this.param.slug ~ '.htm') %}
    {% content this.param.slug %}
{% else %}
    {% content 'default' %}
{% endif %}
1.0.2

Added readme

Feb 07, 2020

1.0.1

Initialize plugin.

Jan 30, 2020