Jul 12
set custom path for october cms media manager widget
You can easily set OctoberCMS media widget path easily so next time you open media widget it will open with that specific location.
Note: its not officially supported and you can consider this as a workaround or straightforward hack.
you need to past this methods
in your controller
to be able to add your custom path
.
Add this code to your controller.
class Movies extends Controller
{
use BackendTraitsSessionMaker;
// ... other code
// this is to write session to media widget session
public function getId($suffix = NULL) {
return 'MediaManager-ocmediamanager';
}
public function create() {
$this->putSession('media_folder', '/session-check/inner-level/');
// put your path here -------------- ^
return $this->asExtension('FormController')->create();
}
}
now next time when you open
october media widget
fromform
then media widget will open folder from given location.
if you need any further assistance then please contact us.
Ad
Related Questions
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
Ad