Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bolt/core
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter committed Sep 26, 2023
2 parents 73bdc42 + fbaf5ff commit 2766f61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Configuration/Content/ContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function factory(?string $name, Collection $contentTypesConfig): s
'slug' => $name,
'singular_slug' => $name,
'singular_name' => $name,
'locales' => [],
'locales' => new Collection(),
'fields' => new Collection(),
// when it is created on the fly
'virtual' => true,
Expand Down
3 changes: 2 additions & 1 deletion src/Twig/ContentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ public function getExcerpt($content, int $length = 280, bool $includeTitle = fal

public function getListFormat($content)
{
$listFormat = $this->contentHelper->get($content, $content->getDefinition()->get('list_format'));
$format = $content->getDefinition()->get('list_format', '[{contenttype} Nº {id} - {status}] {title}');
$listFormat = $this->contentHelper->get($content, $format);

return $listFormat;
}
Expand Down

0 comments on commit 2766f61

Please sign in to comment.