mirror of
https://github.com/typemill/typemill.git
synced 2025-07-25 00:02:28 +02:00
add autorefresh for navigation, demo to readmy, remove deprecation errors from reporting
This commit is contained in:
3
cache/timer.yaml
vendored
3
cache/timer.yaml
vendored
@@ -1 +1,2 @@
|
||||
licenseupdate: 1751571979
|
||||
licenseupdate: 1751827655
|
||||
refreshnavi: 1751919486
|
||||
|
6
content/00-getting-started/04-new.yaml
Normal file
6
content/00-getting-started/04-new.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
meta:
|
||||
modified: false
|
||||
author: Sebastian
|
||||
created: '2025-07-07'
|
||||
time: 20-11-46
|
||||
navtitle: new
|
@@ -2,7 +2,7 @@
|
||||
|
||||
Typemill is an open-source flat-file CMS for creating websites and eBooks with markdown files. It’s commonly used for informational websites such as user manuals, documentation, knowledge bases, wikis, and handbooks.
|
||||
|
||||
Learn more at [typemill.net](https://typemill.net) or get started with the [starter guide](https://docs.typemill.net/getting-started).
|
||||
Learn more at [typemill.net](https://typemill.net), check the [demo installation](https://try.typemill.net), or get started with the [starter guide](https://docs.typemill.net/getting-started).
|
||||
|
||||

|
||||
|
||||
|
@@ -8,6 +8,7 @@ use Slim\Routing\RouteContext;
|
||||
use Typemill\Models\Navigation;
|
||||
use Typemill\Models\Content;
|
||||
use Typemill\Models\Meta;
|
||||
use Typemill\Models\StorageWrapper;
|
||||
use Typemill\Events\OnPagetreeLoaded;
|
||||
use Typemill\Events\OnBreadcrumbLoaded;
|
||||
use Typemill\Events\OnItemLoaded;
|
||||
@@ -31,6 +32,21 @@ class ControllerWebFrontend extends Controller
|
||||
|
||||
# GET THE NAVIGATION
|
||||
$navigation = new Navigation();
|
||||
|
||||
# CLEAR NAVIGATION IF MODE WITHOUT ADMIN
|
||||
if(isset($this->settings['autorefresh']) && $this->settings['autorefresh'] == true)
|
||||
{
|
||||
$interval = (int) ($this->settings['refreshtimer'] ?? 10);
|
||||
$interval = $interval * 60; # seconds
|
||||
|
||||
$storage = new StorageWrapper('\Typemill\Models\Storage');
|
||||
$timeoutIsOver = $storage->timeoutIsOver('refreshnavi', $interval);
|
||||
if($timeoutIsOver === true)
|
||||
{
|
||||
$navigation->clearNavigation();
|
||||
}
|
||||
}
|
||||
|
||||
$draftNavigation = $navigation->getFullDraftNavigation($urlinfo, $langattr);
|
||||
$home = false;
|
||||
|
||||
|
@@ -264,6 +264,15 @@ fieldsetdeveloper:
|
||||
type: checkbox
|
||||
label: "Twig cache"
|
||||
checkboxlabel: "Activate the cache for twig templates"
|
||||
autorefresh:
|
||||
type: checkbox
|
||||
label: "Auto-Refresh Navigation"
|
||||
checkboxlabel: "Enable to refresh the navigation automatically at regular intervals"
|
||||
refreshtimer:
|
||||
type: number
|
||||
label: "Refresh Interval (Minutes)"
|
||||
placeholder: 10
|
||||
description: "Define how often the navigation should be refreshed (in minutes)"
|
||||
proxy:
|
||||
type: checkbox
|
||||
label: "Proxy"
|
||||
|
@@ -54,7 +54,7 @@ $display_errors = 0;
|
||||
|
||||
ini_set('display_errors', $display_errors);
|
||||
ini_set('display_startup_errors', 0);
|
||||
error_reporting(E_ALL);
|
||||
error_reporting(E_ALL & ~E_DEPRECATED);
|
||||
|
||||
/****************************
|
||||
* LOAD SETTINGS *
|
||||
|
Reference in New Issue
Block a user