Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify location for Elemental field via custom "insert before" config #880

Open
wants to merge 2 commits into
base: 4
Choose a base branch
from

Conversation

purplespider
Copy link
Contributor

Currently, the Elemental field is just added to the bottom of the field list (or above 'Metadata'). This PR adds the ability to specify a custom "insert before" field name so that the elemental field can be positioned somewhere more suitable on a per class basis.

e.g. when adding Elemental to the Silverstripe blog module, it results in the Elemental field appearing below the Featured Image and Custom Summary fields, which isn't ideal. So this can now be resolved with a new insert_before_field_name config option:

SilverStripe\Blog\Model\BlogPost:
  extensions:
    - DNADesign\Elemental\Extensions\ElementalPageExtension
  insert_before_field_name: 'FeaturedImage'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants