mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-02-17 20:17:57 +01:00
Feature custom page options (#1104)
* Add slug util function * Add custom add modals support
This commit is contained in:
committed by
Flavio Copes
parent
c30accdea4
commit
bc011c25c3
@@ -655,7 +655,12 @@ class AdminController extends AdminBaseController
|
||||
}
|
||||
|
||||
$route = $data['route'] != '/' ? $data['route'] : '';
|
||||
$folder = ltrim($data['folder'], '_');
|
||||
$folder = $data['folder'];
|
||||
// Handle @slugify-{field} value, automatically slugifies the specified field
|
||||
if (substr($folder, 0, 9) == '@slugify-') {
|
||||
$folder = \Grav\Plugin\Admin\Utils::slug($data[substr($folder, 9)]);
|
||||
}
|
||||
$folder = ltrim($folder, '_');
|
||||
if (!empty($data['modular'])) {
|
||||
$folder = '_' . $folder;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user