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

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
How to update Add-Ons if not on the Update Add-Ons Menu item
Jul 4, 2022

How to manually download an add-on and update it when your site's core versions isn't considered compatible with the add-on version.

Generate a report with author information and form summaries in Concrete CMS.
May 9, 2022

In Concrete CMS, you can use a form to initiate contact between logged-in users and then create helpful reports. After form submissions are collected, they can be searched, sorted, and exported as a spreadsheet. This tutorial will detail how to add author information to a report using the advanced search.

How to clone and customize Atomik theme
Feb 14, 2022
By linuxoid.

How to clone and customize Atomik theme

Update jQuery to 3.5 on Concrete CMS version 8.5.x
Dec 1, 2021
By hissy.

If you have to take some time to fix your site to work with version 9 and want to update jQuery immediately, you can override it.

Add-On Developers: Get Your Add-Ons Ready for Concrete CMS 9.0
Aug 6, 2021
By andrew.

Concrete CMS 9.0 is coming! But there are some changes in version 9 that might affected your add-ons and themes. This document aims to answer questions about the most common ways that your add-ons might need to be changed, and common problems you'll run into.

Permissions for editors in a multilingual site
Jun 2, 2021
By myq.

How to set up a multilingual Concrete CMS site for groups of language-specific editors

Was this information useful?
Thank you for your feedback.