simialbi / yii2-elfinder

This extension integrates the jQuery elFinder into yii2 framework
MIT License
7 stars 5 forks source link

custom label for folders #14

Closed paskuale75 closed 2 years ago

paskuale75 commented 2 years ago

Hi @simialbi is there the possibility to show a different label in display, leaving the connectionSets structure intact? I am attaching an image where the name next to the root is taken from the connectionsSets array.

thanks Schermata da 2021-11-03 10-01-43

simialbi commented 2 years ago

I think alias is what you're looking for (see docs):

'modules' => [
    'elfinder' => [
        'class'          => 'simialbi\yii2\elfinder\Module',
        'connectionSets' => [
            'default' => [ // like elfinder roots
                [
                    'alias' => 'My root folder name', // <== HERE
                    'class' => 'simialbi\yii2\elfinder\ElFinderConfigurationLocalFileSystem',
                    'path'  => '@webroot/files',
                    'URL'   => '@web/files'
                ]
            ]
        ]
    ]
]
paskuale75 commented 2 years ago

Great, thanks @simialbi