How to set the minimum and maximum ranges of style customizer sliders in 5.7

This is a community-contributed tutorial. This tutorial is over a year old and may not apply to your version of Concrete CMS.
Jul 12, 2015

In Concrete CMS 5.7, you can apply custom styles to blocks and block areas using sliders. By default the slider minimum is -50 and the maximum is 200. This can be changed by overriding the default configuration values.

The configuration settings are stored in a multidimensional array in concrete\config\concrete.php.

An example of how configuration settings are stored as arrays.

concrete.limits.style_customizer.size_min

concrete. (filename.php)
    limits. (array key)
        style_customizer. (array key)
            size_min (array key)

Default Slider Values

alt text

In this example, you will be setting the slider minimum to -100 and the maximum to 300.

In your application\config folder, open concrete.php. If you don't have a concrete.php file, you will need to create one. The concrete.php file will only contain PHP, so only an opening PHP tag is required. Paste the following code into concrete.php.

return array(
    'limits' => array(
        'style_customizer' => array(
            'size_min' => -100,
            'size_max' => 300
        )
    )
);

If concrete.php exists and already has arrays of configuration settings. Add a comma after the last first level subarray (not the returned array) and then paste the slider configuration settings after the comma.

Example: existing array

return array(
    'marketplace' => array(
        'enabled' => false
    ),
    'external' => array(
        'news_overlay' => false,
        'news' => false,
    )
);

-- 'external' is the last first level subarray

Example: slider configuration settings

'limits' => array(
    'style_customizer' => array(
        'size_min' => -100,
        'size_max' => 300
    )
)

Example: adding to the existing array

return array(
    'marketplace' => array(
        'enabled' => false
    ),
    'external' => array(
        'news_overlay' => false,
        'news' => false,
    ),
    'limits' => array(
        'style_customizer' => array(
            'size_min' => -100,
            'size_max' => 300
        )
    )
);

The size_min and size_max values are both integers. When used by the sliders, these values will be in pixels (-100 pixels and 300 pixels).

Custom Slider Values

alt text

Recent Tutorials
Configure Composer to work with a Page Type
Feb 20, 2025
By myq.

Fix the "Unable to load block into composer. You must edit this content from within the context of the page." error message

Restoring deleted pages using advanced search
Jan 16, 2025
By myq.

How to recover deleted pages when there are more than a few to choose from.

How to Automate the Copyright Year
Dec 27, 2024

Learn how to keep your website's copyright year updated automatically in Concrete CMS.

How to change the path of a group of pages
Dec 23, 2024
By myq.

Change the canonical path without breaking things

Bi-directional Express associations
Dec 18, 2024
By myq.

Set up associations between Express entries in both directions

Display Express Data Across Multiple Sites
Dec 17, 2024
By myq.

A guide to configuring Express entities and the Express Entry List block to ensure proper data display across multiple sites.

Improvements?

Let us know by posting here.