Skip to content

Commit

Permalink
Updated core, improve API path ancestry
Browse files Browse the repository at this point in the history
  • Loading branch information
markseuffert committed Jan 17, 2025
1 parent 4cefac2 commit c19b965
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions system/extensions/update-available.ini
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ system/themes/copenhagen.css: copenhagen.css, create, update, careful
system/themes/copenhagen.png: copenhagen.png, create

Extension: Core
Version: 0.9.13
Version: 0.9.14
Description: Core functionality of your website.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DocumentationLanguage: en, de, sv
Published: 2024-11-25 14:54:03
Published: 2025-01-17 11:06:48
Status: available
system/workers/core.php: core.php, create, update
system/extensions/core.php: corepatch.txt, update
Expand Down
4 changes: 2 additions & 2 deletions system/extensions/yellow-extension.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Datenstrom Yellow extension settings

Extension: Core
Version: 0.9.13
Version: 0.9.14
Description: Core functionality of your website.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DocumentationLanguage: en, de, sv
Published: 2024-11-25 14:54:03
Published: 2025-01-17 11:06:48
Status: available
system/workers/core.php: core.php, create, update
system/extensions/core.php: corepatch.txt, update
Expand Down
14 changes: 8 additions & 6 deletions system/workers/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Core extension, https://github.com/annaesvensson/yellow-core

class YellowCore {
const VERSION = "0.9.13";
const VERSION = "0.9.14";
const RELEASE = "0.9";
public $content; // content files
public $media; // media files
Expand Down Expand Up @@ -395,11 +395,13 @@ public function top($showInvisible = false) {
public function path($location, $absoluteLocation = false) {
$pages = new YellowPageCollection($this->yellow);
if ($absoluteLocation) $location = substru($location, strlenu($this->yellow->page->base));
if ($page = $this->find($location)) {
$pages->prepend($page);
for (; $parent = $page->getParent(); $page=$parent) {
$pages->prepend($parent);
}
$page = null;
while (!$this->yellow->lookup->isRootLocation($location)) {
$page = $this->find($location);
if ($page) $pages->prepend($page);
$location = $this->getParentLocation($location);
}
if ($page) {
$home = $this->find($this->getHomeLocation($page->location));
if ($home && $home->location!=$page->location) $pages->prepend($home);
}
Expand Down

0 comments on commit c19b965

Please sign in to comment.