Simplify how we determine if it's a page, fix https://github.com/getgrav/grav/issues/1100

This commit is contained in:
Flavio Copes
2016-10-12 18:33:57 +02:00
parent 81ff078ab9
commit ba2c8177f8

View File

@@ -30,7 +30,8 @@
{% set files = global.files %}
{% set config = global.grav.config %}
{% set route = global.context.route() %}
{% set type = global.context.content() is not null ? 'pages' : global.plugin ? 'plugins' : global.theme ? 'themes' : 'config' %}
{% set type = get_class(global.context) == 'Grav\\Common\\Page\\Page' ? 'pages' : global.plugin ? 'plugins' : global.theme ? 'themes' : 'config' %}
{% set blueprint_name = global.blueprints.getFilename %}
{% if type == 'pages' %}
{% set blueprint_name = type ~ '/' ~ blueprint_name %}