Skip to content

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

Open
purplespider wants to merge 2 commits into
silverstripe:4from
purplespider:patch-1
Open

Ability to specify location for Elemental field via custom "insert before" config#880
purplespider wants to merge 2 commits into
silverstripe:4from
purplespider:patch-1

Conversation

@purplespider

Copy link
Copy Markdown
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'

Comment thread src/Extensions/ElementalAreasExtension.php Outdated
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