Add option for config page to sync with drupal config system.

Created on 31 October 2018, about 6 years ago
Updated 29 September 2023, about 1 year ago

The fact that config pages don't sync, and therefore can't be overwritten is one thing I like about the module.

But there are times where one must create configuration settings forms that use Drupal's configuration settings. Especially if you are managing the syncing of configuration between environments. Config Pages would be a great tool for the creation of the form if you could use it in these situations.

It would be great if you could just have a checkbox when creating a config page type that says, sync this type.

Then you could have config pages that don't sync and config pages that do sync.

if you have checked this checkbox, when you save this config page it would save a configuration yml, and when you run drush cim on your other environments it would import that configuration file and update the config page.

✨ Feature request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oknate Greater New York City Area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada _randy

    Bad form posting to a closed thread, however, there's been zero documentation that I can find that gives a really good example on how to use YAML Content module for importing a config page.

    This is an example for those who come across this issue queue item.

    I have a Config Page with a couple of Viewfield fields on it used as an admin page to show some live data. Pretty ubiquitous use of a config page.

    Here's what I've done to make this work:

    1. install the YAML Content module ( https://www.drupal.org/project/yaml_content β†’ )

    2. the custom module I have written has a /content folder within it.

    3. I created the following yml file to populate a config page that has 2 viewfields on it. Named the yml file admin_dashboard.content.yml. The contents of the yml file is:

    - entity: config_pages
      field_import_table_management: 
        - 
          target_id: admin_import_data
          display_id: block_1
          langcode: und
          delta: 0
          arguments: ''
          items_to_display: ''
      field_team_listing:
        - 
          target_id: admin_listing
          display_id: block_1 
          langcode: und
          delta: 0
          arguments: ''
          items_to_display: ''
    

    I then import this via Drush like this:

    drush yaml-content-import-module mymodule

    where 'mymodule' is the custom module with the /content folder within it.

    Hope this helps others so they're not fumbling around as I did for a few hours.

Production build 0.71.5 2024