Skip to content

Commit

Permalink
README and docblock updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirish committed Oct 18, 2023
1 parent 63b2847 commit 7093783
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
npm-debug.log
node_modules/
.DS_Store
50 changes: 22 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,28 @@ A block that displays featured content - large image, title, description and lin

See [License](LICENSE.md)

## Usage

A block to display rows of featured content - large image, title, description, and link. Includes an option to alternate the layout of the features from image left to image right.

### Template Notes

The default templates are based off [Bootstrap 5](https://getbootstrap.com/) classes/styling.

## Screen Shots

#### Default Template of a Features Element
![Default Template of a Features Element](./docs/en/_images/features-block-sample.png)

#### Default Template of a Features Element with Alternate Layout
![Default Template of a Features Element Alternate](./docs/en/_images/features-block-sample-alt.png)

#### CMS - Features Element Main Tab
![CMS - Features Block Main Tab](./docs/en/_images/features-block-cms.png)

#### CMS - Features Element - Feature Add/Edit
![CMS - Features Block Main Tab](./docs/en/_images/features-block-cms-feature.png)

## Upgrading from version 2

Elemental Features drops `sheadawson/silverstripe-linkable` usage in favor of `gorriecoe/silverstripe-linkfield`. To avoid data loss, install the `dynamic/silverstripe-link-migrator` module as follows:
Expand All @@ -39,34 +61,6 @@ vendor/bin/sake dev/tasks/LinkableMigrationTask

This will populate all of the new Link fields with data from the old class.


## Usage

A block to display rows of featured content - image, title, description, link.

### Template Notes

The default templates are based off [Bootstrap 4](https://getbootstrap.com/) classes/styling.

Also included in the CMS is a checkbox for an alternate layout option. Both layout options are setup in includes that will work right away.

## Screen Shots

#### Front End sample of a Features Element
![Front End sample of a Features Element](./docs/en/_images/features-block-sample.jpg)

#### Front End sample of a Features Element Alternate Layout
![Front End sample of a Features Element](./docs/en/_images/features-block-sample-alt.jpg)

#### CMS - Features Element Main Tab
![CMS - Features Block Main Tab](./docs/en/_images/features-block-cms.jpg)

#### CMS - Features Element - Features List
![CMS - Features Block Main Tab](./docs/en/_images/features-block-cms-features-list.jpg)

#### CMS - Features Element - Feature Add/Edit
![CMS - Features Block Main Tab](./docs/en/_images/features-block-cms-feature.jpg)

## Getting more elements

See [Elemental modules by Dynamic](https://github.com/orgs/dynamic/repositories?q=elemental&type=all&language=&sort=)
Expand Down
Binary file added docs/en/_images/features-block-cms-feature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed docs/en/_images/features-block-cms.jpg
Binary file not shown.
Binary file added docs/en/_images/features-block-cms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/en/_images/features-block-sample-alt.jpg
Binary file not shown.
Binary file added docs/en/_images/features-block-sample-alt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/en/_images/features-block-sample.jpg
Binary file not shown.
Binary file added docs/en/_images/features-block-sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/Elements/ElementFeatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
/**
* Class PageSectionBlock.
*
* @method HasManyList $Features
* @property string $Content
* @property bool $Alternate
* @method DataList|FeatureObject[] Features()
*/
class ElementFeatures extends BaseElement
{
Expand Down
1 change: 1 addition & 0 deletions src/Model/FeatureObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
* @property int $Sort
* @property int $ElementFeaturesID
* @method ElementFeatures ElementFeatures()
*/
class FeatureObject extends BaseElementObject
{
Expand Down

0 comments on commit 7093783

Please sign in to comment.