Part of the Imce ecosystem · 10 projects
This module allows you to create dynamic paths within IMCE profiles using custom plugins. This enables flexible organization and management of uploaded files based on your defined logic.
Overview
This module add the possibility to create Dynamic paths in Imce profiles by creating imce_dfp plugins.
How to setup in Imce configuration
- Go to Imce configuration /admin/config/media/imce
- Create a profile
- Set the plugin name you created in the profile folder path like this
dfp_plugin: my_plugin
How to create a plugin
- Create a module
- Create a plugin in the folder my_module/src/Plugin/ImceDfp
- See, as example, a plugin code below :
<?php
namespace Drupal\my_module\Plugin\ImceDfp;
use Drupal\Core\Plugin\PluginBase;
use Drupal\imce_dfp\Service\ImceDfpPluginInterface;
/**
* My plugin example code.
*
* @ImceDfp (
* id = "my_plugin",
* title = @Translation("My plugin"),
* description = @Translation("My plugin example code."),
* )
*/
class MyPlugin extends PluginBase implements ImceDfpPluginInterface {
/**
* {@inheritdoc}
*/
public function getPaths($profile_id, $conf): array {
$paths = [];
$paths[] = 'my/new/folder/path';
return $paths;
}
}
Dependencies
Ask your assistant about Imce dynamic folder path
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Imce ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 9–11 | Aug 22, 2024 | ||
| 1.0.0-beta2 | Pre-release | 9–10 | Aug 17, 2023 |