Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Feature: Add extension capability #8

@patricknelson

Description

@patricknelson

Hi, it looks like the functionality for this class GridFieldPage isn't super complicated and really just provides some methods that extend the useful grid-capable functionality. In my case, I have a pretty complicated class hierarchy in my site and, relatively deep in that hierarchy I have a one-off situation where a certain page type needs to be able to be displayed inside of a GridField. In my case, it doesn't make sense to affect 90% of the pages on my site in order to apply a few methods, so I got to thinking...

I propose either converting this to an extension (less likely) or better, adding an extension to this code base and then sharing functionality between classes via traits (easily accomplished with good compatibility via direct includes as SilverStripe 3.x apparently still has issues with autoloading traits 🤕).

I think I'll submit a PR with an example of this change. In the meantime, I'll have a custom version of this in my code base which is just a copy of this code applied as an extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions