Creating a package
First thing is that I want to create a package of it which I managed to to, but, I want to have a settings page on the dashboard with one option really. I got the single page there but how do I proceed?
I want to be able to get the option value from my block easily, I also want to be able to edit the value in settings.
is that clear?
should I use db's or something else, Help please.
Your dashboard single page will need a controller and a view. The controller can use the config for storing/retrieving the settings.
Your block controller then read config to find out how it is configured.
$pkg = Package::getByHandle('my_package_handle'); $pkg->saveConfig('MY_CONFIG_SYMBOL', $data ); $data = $pkg->config('MY_CONFIG_SYMBOL');
(The convention seems to be that config symbols are uppercase)
You can use php serialize/unserialize or json to store more complex data structures.
Use phpMyAdmin to browse the database Config table and get some ideas.