diff --git a/CHANGELOG.md b/CHANGELOG.md index 36c0700..5487e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Unreleased + +### Changed +- Craft 5 compatibility. + ## 1.2.3 - 2024-02-21 ### Changed diff --git a/composer.json b/composer.json index 9a5d9ac..350da42 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ } ], "require": { - "craftcms/cms": "^4.0.0" + "craftcms/cms": "^5.0.0-beta" }, "autoload": { "psr-4": { diff --git a/src/fields/TotalViews.php b/src/fields/TotalViews.php index 023ecdb..099c882 100644 --- a/src/fields/TotalViews.php +++ b/src/fields/TotalViews.php @@ -89,7 +89,7 @@ public function getInputHtml(mixed $value, ?ElementInterface $element = null): s /** * @inheritdoc */ - public function getTableAttributeHtml(mixed $value, ElementInterface $element): string + public function getPreviewHtml(mixed $value, ElementInterface $element): string { return Craft::$app->getView()->renderTemplate('view-count/fields/totalviews-column', [ 'totalViews' => $this->_getTotal($element)