Skip to content

Commit

Permalink
fix: issue with loading latte
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Oct 29, 2024
1 parent 4cb5505 commit edef08f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,21 @@ public function __construct()

public function init()
{
$config = wire()->config;
$this->path = wire()->config->paths($this);
$this->home = wire()->pages->get(1);

// load composer autoloader as early as possible
// this is so that anyone can create custom latte extensions
// without having to require the autoloader in their extension
require_once $this->path . "vendor/autoload.php";
$this->wire->classLoader->addNamespace("RockFrontend", __DIR__ . "/classes");
wire()->classLoader->addNamespace("RockFrontend", __DIR__ . "/classes");

// if settings are set in config.php we make sure to use these settings
$config = $this->wire->config;
if ($config->livereloadBackend !== null) {
$this->livereloadBackend = $config->livereloadBackend;
}

$this->path = $this->wire->config->paths($this);
$this->home = $this->wire->pages->get(1);

if (!is_array($this->features)) $this->features = [];

// make $rockfrontend and $home variable available in template files
Expand Down

0 comments on commit edef08f

Please sign in to comment.