User provided configuration data for single pages, blocks, etc

Permalink
I am writing a package which after installing, the user should be prompted to update some user provided settings. Is there some sort of "Concrete5" way of doing this? If so, please direct me to documentation if available (I've searched but no luck).

If no docs, can you help me validate my thoughts?

After user installs package, I must somehow register some JS asset which instructs them to go to the setup page. Extrapolating from the core code, I would create a single page packages/my_package/single_pages/dashboard/system/my_package.php, and a controller in the normal part. For the other single pages being added by the package, maybe just have them confirm that setup is complete before being rendered.

I am probably missing quite a few things, and it would be nice to follow the C5 approach if such existed.

Thanks!

View Replies: View Best Answer
mnakalay replied on at Permalink Best Answer Reply
mnakalay
you could do that in 1 of 2 ways.

you could present a screen before install where you ask them to answer a few questions and use their answers to do the settings yourself.

docs:https://documentation.concrete5.org/developers/packages/installation...

Alternatively, you can show them a screen after install and point them towards where you want them to go. it's the same idea as the other one but the file is intall_post.php and you can't grab info from the user from that screen.

I hope this helps.
NotionCommotion replied on at Permalink Reply
Yes it does! I like the first approach, and thank you to the link to the docs.