Folder_contents: How to change default shown columns?

In folder_contents I can configure which columns to show (in the above left corner).
This sets a (language specific) session cookie.

But I want it to show the Type columns by default.

Is there configuration or something I can override to make this happen?

Just add some js code to manipulate the cookie and set a longer expiration date. This should do it. A little configlet for that would be nice indeed:

require([], function(){
    setCookie('_fc_activeColumns', escape('{"value":["portal_type"]}'), 10);
    function setCookie(cname, cvalue, exdays) {
        var d = new Date();
        d.setTime(d.getTime() + (exdays*24*60*60*1000));
        var expires = "expires="+d.toUTCString();
        document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/";
    }
});
1 Like