Skip to content

Commit

Permalink
fix: use getTitle() method for post title retrieval in templates (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorbrink authored Jan 21, 2025
1 parent ef48857 commit 65b1795
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private function getDefaultValuesForPosts() {
private function setPostViewData(object $post, $index = false)
{
$post->excerptShort = in_array('excerpt', $this->data['posts_fields'] ?? []) ? $post->excerptShort : false;
$post->postTitle = in_array('title', $this->data['posts_fields'] ?? []) ? $post->postTitle : false;
$post->postTitle = in_array('title', $this->data['posts_fields'] ?? []) ? $post->getTitle() : false;
$post->image = in_array('image', $this->data['posts_fields'] ?? []) ? $this->getImageContractOrByRatio(
$post->images ?? null,
$post->imageContract ?? null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function prepare(): ?array
}
}

$accordion[$index]['heading'] = $item->postTitle ?? '';
$accordion[$index]['heading'] = $item->getTitle() ?? '';
$accordion[$index]['content'] = $item->postContentFiltered ?? '';
$accordion[$index]['classList'] = $item->classList ?? [];
$accordion[$index]['attributeList'] = ['data-js-item-id' => $item->getId()];
Expand Down

0 comments on commit 65b1795

Please sign in to comment.