diff --git a/README.md b/README.md index e407d10..b1f1c9a 100755 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ ### Suggested Modules -* Silverstripe Widgets Module * Silverstripe Comments Module ## Installation diff --git a/_config/config.yml b/_config/config.yml index e806238..e4fb5e0 100755 --- a/_config/config.yml +++ b/_config/config.yml @@ -4,12 +4,3 @@ Name: blogconfig SilverStripe\Security\Member: extensions: - SilverStripe\Blog\Model\BlogMemberExtension - ---- -Name: featuredpostswidget -Only: - moduleexists: silverstripe/widgets ---- -SilverStripe\Blog\Model\BlogPost: - extensions: - - SilverStripe\Blog\Model\BlogPostFeaturedExtension diff --git a/docs/en/configuring-widgets.md b/docs/en/configuring-widgets.md deleted file mode 100644 index c98a199..0000000 --- a/docs/en/configuring-widgets.md +++ /dev/null @@ -1,18 +0,0 @@ -# Configuring Widgets - -The blog module comes bundled with some useful widgets. To take advantage of them, you'll need to install the -[SilverStripe widgets module](https://github.com/silverstripe/silverstripe-widgets). Widgets are totally optional - -so your blog will work just fine without having widgets installed. - -You can enable the widgets by adding the following YML config: - -```yaml -SilverStripe\Blog\Model\Blog: - extensions: - - SilverStripe\Widgets\Extensions\WidgetPageExtension -SilverStripe\Blog\Model\BlogPost: - extensions: - - SilverStripe\Widgets\Extensions\WidgetPageExtension -``` - -Once you have widgets installed you'll see the "Widgets" tab in the content section of your blog. diff --git a/docs/en/index.md b/docs/en/index.md index 955e9f0..bbf4a1c 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -3,7 +3,6 @@ ## Development * [Configuring blog posts in Sitetree](configuring-blog-posts.md) * [Configuring blog when on large websites](configuring-large-websites.md) - * [Configuring widgets](configuring-widgets.md) * [Configuring pagination](configuring-pagination.md) * [Configuring featured image uploads](configuring-featured-images.md) diff --git a/docs/en/userguide/index.md b/docs/en/userguide/index.md index 73e2b09..79f958a 100644 --- a/docs/en/userguide/index.md +++ b/docs/en/userguide/index.md @@ -6,7 +6,7 @@ summary: Working with blogging and comments in SilverStripe CMS. ## Before we begin -Make sure that your SilverStripe CMS installation has the [Blog](https://addons.silverstripe.org/add-ons/silverstripe/blog/) module and optional, [Widgets](https://addons.silverstripe.org/add-ons/silverstripe/widgets/) and [Comments](https://addons.silverstripe.org/add-ons/silverstripe/comments/) modules installed. +Make sure that your SilverStripe CMS installation has the [Blog](https://addons.silverstripe.org/add-ons/silverstripe/blog/) module and optional, and [Comments](https://addons.silverstripe.org/add-ons/silverstripe/comments/) modules installed. ## Blogging features @@ -16,5 +16,4 @@ Make sure that your SilverStripe CMS installation has the [Blog](https://addons. * [Roles](roles.md) * [RSS Feed](rss-feed.md) * [Tags and categories](tags-and-categories.md) - * [Using widgets](using-widgets.md) * [Managing comments](managing-comments.md) diff --git a/docs/en/userguide/using-widgets.md b/docs/en/userguide/using-widgets.md deleted file mode 100644 index c7f3650..0000000 --- a/docs/en/userguide/using-widgets.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Using widgets ---- - -# Using Widgets - -**This guide assumes you have the optional [Widgets](https://addons.silverstripe.org/add-ons/silverstripe/widgets/) module installed** - -![](_images/widgets.png) - -To add a widget - simply click the *plus* icon and the widget will be appear in the "Widgets currently used" column. - -After you've finished adding widgets, publish your blog, and your freshly minted widgets will appear in your blog's sidebar. - -## Available blog widgets - -### Archive - -The archive widget helps you keep historical content relevant, by generating a list of posts, ordered by month or year. - -![](_images/widgets-archive.png) - -### Blog Categories - -The blog categories widget lets your readers easily find the content they're interested in. - -![](_images/widgets-categories.png) - -### Recent Posts - -The recent posts widget is great for providing quick links to your latest content. - -![](_images/widgets-recent-posts.png) - -### Blog Tags - -Similar to the blog categories widget, blog tags help your readers find relevant content, at more fine grained level. - -![](_images/widgets-tags.png) - -## Optional extra widgets - -Additional widgets can be installed alongside your blog. - - * [Content Widget - Display HTML content in a widget](https://github.com/silverstripe-labs/silverstripe-content-widget) - - - diff --git a/src/Model/BlogCategory.php b/src/Model/BlogCategory.php index 502d87d..637ff0e 100644 --- a/src/Model/BlogCategory.php +++ b/src/Model/BlogCategory.php @@ -86,6 +86,7 @@ class BlogCategory extends DataObject implements CategorisationObject $parent = ($ownerRecord instanceof SiteTree) ? $ownerRecord->Parent() : null; $field = TagField::create( $relationName, + /** @phpstan-ignore translation.key (we need the key to be dynamic here) */ _t($ownerRecord->ClassName . '.' . $relationName, $fieldTitle), ($parent instanceof Blog) ? $parent->Categories() : static::get(), $ownerRecord->$relationName() diff --git a/src/Model/BlogPost.php b/src/Model/BlogPost.php index 754a4e9..c733522 100644 --- a/src/Model/BlogPost.php +++ b/src/Model/BlogPost.php @@ -106,13 +106,11 @@ class BlogPost extends Page /** * The ProvideComments db column is defined in the silverstripe/comments module - * The InheritSideBar db column is defined in the silverstripe/widgets module * * @var array */ private static $defaults = [ 'ShowInMenus' => false, - 'InheritSideBar' => true, 'ProvideComments' => true ]; diff --git a/src/Model/BlogTag.php b/src/Model/BlogTag.php index b058335..6cf614e 100644 --- a/src/Model/BlogTag.php +++ b/src/Model/BlogTag.php @@ -86,6 +86,7 @@ class BlogTag extends DataObject implements CategorisationObject $parent = ($ownerRecord instanceof SiteTree) ? $ownerRecord->Parent() : null; $field = TagField::create( $relationName, + /** @phpstan-ignore translation.key (we need the key to be dynamic here) */ _t($ownerRecord->ClassName . '.' . $relationName, $fieldTitle), ($parent instanceof Blog) ? $parent->Tags() : static::get(), $ownerRecord->$relationName()