BoldMinded Docs
  • Overview
  • Advanced Categories
    • Docs
      • Installation
      • Requirements
      • Setup & Configuration
        • Hidden Config Options
        • Multi-Site Manager
      • Template Tags
      • FAQs
  • Ansel
    • Docs
      • Installation
      • Upgrading
      • Requirements
      • Settings
      • Usage
        • Channel:Form
      • Troubleshooting
      • Template Tags
    • FAQs
  • Bloqs
    • Docs
      • Why Bloqs?
      • Features
        • Add Bloq Menu
        • Nesting
        • Cloning
        • Drafts
        • Bloq Usage
        • Deprecated Bloqs
        • Caching
        • Profiling
        • Bloq Components
        • Bloq Groups
      • Installation
      • Requirements & Compatibility
      • Setup & Configuration
        • Hidden Config Options
      • Creating Bloqs
      • Template Tags
        • Twig
        • Examples
      • Context Variables
      • Add-on Developers
    • FAQs
  • Carson
    • Docs
      • Installation
      • Requirements
      • Fields
        • Omni
          • Hidden Config
        • Assistant
        • SEO
      • Troubleshooting
  • Custom System Messages
    • Docs
      • Installation
      • Requirements
      • Variables
      • Template Tags
  • DataGrab
    • Docs
      • Installation & Upgrading
      • Requirements
      • Troubleshooting
      • Configuring Imports
      • Running Imports
      • Automatic Imports
        • Importing with cron
        • Importing with cron (Deprecated)
      • Endpoints
      • Configuration Options
        • Config File Options
        • Increasing PHP memory limit
      • Import Types
        • CSV
          • Importing into Grid or Matrix field
        • JSON
          • Example file
        • WordPress
        • XML
          • Example file
        • Creating your own import type
      • Assigning Authors
      • Field Types
        • Assets
        • Ansel
        • Bloqs
        • Calendar
        • Channel Images
        • Date
        • File
        • File Grid
        • Fluid
        • Grid
        • Low Events
        • Relationships
        • Simple Grids & Tables
        • Tag & Tagger
        • Matrix (Deprecated)
        • Creating your own fieldtype
      • Publisher
      • Version 5.0
      • Version 6.0
    • FAQs
  • Feature Flags
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Template Tags
      • A/B Testing
    • FAQs
  • Fluidity
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Demos
    • FAQs
  • Logit
    • Docs
      • Installation
      • Requirements
      • Configuration
    • FAQs
  • Publisher
    • Docs
      • Installation
      • Requirements
      • Issues & Tips
      • Languages
      • Template Tags
        • Forms
        • Email Notification Templates
        • Channel:Form
        • Twig
      • URL Translations
      • Auto Translations
      • Diffs
      • Drafts
      • Categories
      • Phrases
      • Persistence
      • Performance
      • Add-ons
        • First Party
        • Third Party
      • Hidden Config
      • Extending Publisher
    • FAQs
  • Reading Time PRo
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
  • Reel
    • Docs
      • Installation
      • Requirements
      • Settings
      • Field Tags
    • FAQs
  • Simple Grids & Tables
    • Docs
      • Installation
      • Requirements
      • Template Tags
      • CSV File Imports
      • Field Settings
      • GraphQL
      • Advanced Configuration (deprecated)
    • FAQs
  • Sitemap
    • Docs
      • Installation
      • Requirements
      • Configuration & Usage
    • FAQs
  • Snaptcha
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
      • Developers
    • FAQs
  • Speedy
    • Docs
      • Installation & Updating
      • Requirements
      • Configuration
      • Template Tags
      • Static Caching
        • Real World Example
      • Frontedit Support
      • Control Panel
      • Migrating from CE Cache
      • Diagnostics
      • CLI Commands
      • Reverse Proxy Purging
    • FAQs
  • Trek (unreleased)
    • Docs
      • Configuration
    • FAQs
  • Queue
    • Docs
Powered by GitBook
On this page

Was this helpful?

  1. Fluidity
  2. Docs

Configuration

Once installed, Fluidity's configuration is entirely managed in a PHP array.

Create a file called config.fluidity.php in your system/user/config folder. It will need to adhere to the following format:

<?php

return [
    // Would you like Fluidity to check to see if there are updates?
    'checkForUpdates' => true,

    // By default it will show the field's icon.
    // This is a global setting which can be disabled on a
    // per-field basis in the advanced config.
    'showIcons' => true,
    
    // This is where you organize your fields into groups.
    'fields' => [
    
        // You will need the field ID, which you can find when
        // viewing the admin.php?/cp/fields page.
        1 => [
        
            // Give the group a friendly label
            'Group Label' => [
            
                // and finally all the fields you want to display in this group.
                'field_short_name',
                'another_field,
            ],
        ],
    ],
];
        

The following is an example of the advanced configuration. You can override the field's label, add a description, override it's default icon, or even choose which image to display in the preview pop-up.

<?php

return [
    'licenseKey' => '',
    'checkForUpdates' => true,
    'showIcons' => true,
    'fields' => [
        27 => [ // Fluid field ID
            'Add Content' => [
                'basic_text_field' => [
                    'label' => 'Basic Text Field',
                    'desc' => 'This is an optional extended description of the field. With even more text that wraps to another line.',
                    'icon' => 'https://www.publicdomainpictures.net/pictures/370000/velka/smiley-emoji.png',
                    'preview' => 'https://mysite.com/uploads/fluidity-demo-1.png',
                ],
                'text_field_group' => [
                    'label' => 'Special',
                    'desc' => 'Something Special',
                    'icon' => '', // to optionally disable a single icon, set the value to a blank string.
                    'preview' => 'https://mysite.com/uploads/fluidity-demo-2.png',
                ],
            ],
            'Add Misc' => [
                'template_or_snippet' => [
                    'label' => 'Embed Template or Snippet',
                ],
                'buttons' => [
                    'label' => 'Buttons',
                ],
                'color_picker' => [
                    'label' => 'Color Picker',
                ],
                'file' => [
                    'label' => 'File',
                ],
                'feature_flag' => [
                    'label' => 'Feature Flag',
                ],
            ],
        ],
    ]
];

You can optionally go with a basic config if you simply want to group fields and not override the field name, add a description, icon, or preview image.

<?php

return [
    'licenseKey' => '',
    'checkForUpdates' => true,
    'showIcons' => false,
    'fields' => [
        27 => [ // Fluid field ID
            'Content' => [
                'basic_text_field',
                'text_field_group',
            ],
            'Misc' => [
                'template_or_snippet',
                'buttons',
                'color_picker',
                'file',
                'feature_flag',
            ],
        ],
    ],
];

Since this is a PHP array, you can dynamically configure your field:

<?php

$contentFields = [
    'basic_text_field',
    'text_field_group',
];

$miscFields = [
    'template_or_snippet',
    'buttons',
    'color_picker',
    'file',
    'feature_flag',
];

return [
    'licenseKey' => '',
    'checkForUpdates' => true,
    'showIcons' => false,
    'fields' => [
        27 => [
            'Content' => $contentFields,
            'Misc' => $miscFields,
        ],
        28 => [
            'Content' => array_merge($contentFields, $miscFields),
        ]
    ],
];

Last updated 9 months ago

Was this helpful?