1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 14:16:46 +02:00

fix(fields): fix issue with slug field in Entries API #520

This commit is contained in:
Awilum
2020-12-20 10:28:09 +03:00
parent 3442e5afe4
commit 850675e23d

View File

@@ -14,7 +14,7 @@ if (flextype('registry')->get('flextype.settings.entries.fields.slug.enabled'))
return;
}
$parts = strings(flextype('entries')->getStorage('fetch.id'))->trimSlashes()->segments();
$parts = explode('/', ltrim(rtrim(flextype('entries')->getStorage('fetch.id'), '/'), '/'));
flextype('entries')->setStorage('fetch.data.slug', (string) end($parts));
});
}