mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 03:26:04 +02:00
This does not appear to be used as $this->pages in admin.php does not exist
This commit is contained in:
20
admin.php
20
admin.php
@@ -463,26 +463,6 @@ class AdminPlugin extends Plugin
|
||||
// Gather Plugin-hooked dashboard items
|
||||
$this->grav->fireEvent('onAdminDashboard');
|
||||
|
||||
break;
|
||||
case 'pages':
|
||||
$path = $this->route;
|
||||
|
||||
if (!$path) {
|
||||
$path = '/';
|
||||
}
|
||||
|
||||
if (!isset($this->pages[$path])) {
|
||||
$page = null;
|
||||
} else {
|
||||
$page = $this->pages[$path];
|
||||
}
|
||||
|
||||
if ($page != null) {
|
||||
$twig->twig_vars['file'] = File::instance($page->filePath());
|
||||
$twig->twig_vars['media_types'] = str_replace('defaults,', '',
|
||||
implode(',.', array_keys($this->config->get('media.types'))));
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
{% if mode == 'new' %}
|
||||
{% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('pages/page'), data: context } %}
|
||||
{% elseif mode == 'edit' %}
|
||||
<div class="admin-form-wrapper" data-media-url="{{ base_url }}/media/{{ admin.route|trim('/') }}.json" data-media-local="{{ base_url_relative_frontend }}/{{ admin.route|trim('/') }}" data-media-types="{{ media_types }}">
|
||||
<div class="admin-form-wrapper" data-media-url="{{ base_url }}/media/{{ admin.route|trim('/') }}.json" data-media-local="{{ base_url_relative_frontend }}/{{ admin.route|trim('/') }}">
|
||||
<div id="admin-topbar">
|
||||
|
||||
{% if admin.multilang and page_lang %}
|
||||
|
||||
Reference in New Issue
Block a user