Upgrade to 3.8.1
This commit is contained in:
@@ -76,7 +76,9 @@ class File extends Model
|
||||
// for markdown notation or the UUID for Kirbytext (since
|
||||
// Kirbytags support can resolve UUIDs directly)
|
||||
if ($absolute === true) {
|
||||
$url = $type === 'markdown' ? $this->model->permalink() : $this->model->uuid();
|
||||
$url = $type === 'markdown' ? $this->model->permalink() : $this->model->uuid();
|
||||
// if UUIDs are disabled, fall back to URL
|
||||
$url ??= $this->model->url();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -286,7 +286,7 @@ abstract class Model
|
||||
'link' => $this->url(true),
|
||||
'sortable' => true,
|
||||
'text' => $this->model->toSafeString($params['text'] ?? false),
|
||||
'uuid' => $this->model->uuid()->toString(),
|
||||
'uuid' => $this->model->uuid()?->toString() ?? $this->model->id(),
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -49,10 +49,15 @@ class Page extends Model
|
||||
|
||||
$title = $this->model->title();
|
||||
|
||||
return match ($type) {
|
||||
'markdown' => '[' . $title . '](' . $this->model->permalink() . ')',
|
||||
default => '(link: ' . $this->model->uuid() . ' text: ' . $title . ')'
|
||||
};
|
||||
// type: markdown
|
||||
if ($type === 'markdown') {
|
||||
$url = $this->model->permalink() ?? $this->model->url();
|
||||
return '[' . $title . '](' . $url . ')';
|
||||
}
|
||||
|
||||
// type: kirbytext
|
||||
$link = $this->model->uuid() ?? $this->model->uri();
|
||||
return '(link: ' . $link . ' text: ' . $title . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user