mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 00:57:25 +02:00
Simplify how we determine if it's a page, fix https://github.com/getgrav/grav/issues/1100
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user