mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 05:05:31 +02:00
Use new method of getting base URL
This commit is contained in:
@@ -187,7 +187,7 @@ class AdminPlugin extends Plugin
|
||||
public function onTwigSiteVariables()
|
||||
{
|
||||
// TODO: use real plugin name instead
|
||||
$theme_url = $this->config->get('system.base_url_relative') . '/user/plugins/admin/themes/' . $this->theme;
|
||||
$theme_url = $this->grav['base_url'] . '/user/plugins/admin/themes/' . $this->theme;
|
||||
$twig = $this->grav['twig'];
|
||||
|
||||
// Dynamic type support
|
||||
|
||||
@@ -50,7 +50,7 @@ class Popularity
|
||||
{
|
||||
/** @var Page $page */
|
||||
$page = self::$grav['page'];
|
||||
$relative_url = str_replace($this->config->get('system.base_url_relative'), '', $page->url());
|
||||
$relative_url = str_replace(self::$grav['base_url_relative'], '', $page->url());
|
||||
|
||||
// Don't track error pages or pages that have no route
|
||||
if ($page->template() == 'error' || !$page->route()) {
|
||||
|
||||
Reference in New Issue
Block a user