Closed tobias-kuendig closed 8 months ago
Some advice for this: Adding a new tab to the CMS partials section might be tempting; however, the best approach could be to include a new namespace called "boxes" in the Editor.
It may need an extended Cms\Classes\Partial
object that saves both a .htm and a .yaml file and only lists partials that meet this criterion. Basically, a duplication of the CMS > Partials section but filtered by box-activated partials.
Look at the tailor module Tailor\Classes\EditorExtension
for a sample of this. It is registered with the service provider with the following code:
Event::listen('editor.extension.register', function () {
return \Tailor\Classes\EditorExtension::class;
});
If you need help with this, feel free to reach out.
edit: Even consider possibly introducing a new CMS template type called Box
that can house a single template approach inside a dedicated "boxes" folder. Although, I'm not sure how coupled it is to the existing partial system.
# File: themes/demo/boxes/my-box.htm
# YAML
fields: []
==
<!-- HTML -->
Hello world!
As a developper, heavy user of october CMS (and soon, heavy user of boxes), the best UX experience would be this one :
Get all the boxes under a "boxes" category in the Editor (like CMS, like Tailor, see screenshot below)
When you edit a box, being able to edit whole box in a single file (markup, php code, yaml configuration, see screenshot below)
Do you think it would be possible to handle boxes like that ? It would be awesome
EDIT : In fact, this is a really needed feature because, after some tests with the inline configuration, I discovered that they are deleted when you edit your boxes partial using october Editor, so, even with inline configuration, you are obliged to use an external IDE to work with boxes, which is really annonying for us in the agency.
@PubliAlex Exactly ^
Following that thread cause I'm very interested by this feature. Editing boxes with octobercms editor would be game changer for that plugin
Bump, is the feature planned in a near future ? We have many projects that would use boxes to give more control to final user, but the impossibility to manage boxes using october cms IDE is a real limitation to us.
I am currently working on this, there will be a release in the coming days/weeks.
Wonderful news, we are on the starting blocks to test that feature as soon as it's ready !
An initial draft is available for testing as version v3.4.0-rc.4
.
composer require offline/oc-boxes-plugin:^v3.4.0-rc.4
Basic functionality is available, child theme support will be up next.
Tested and it seems wonderful. Being able to create boxes like that is a real comfort, great job !
Thank you @PubliAlex
This feature is now available in v3.4.0.
Provide an easy way to modify Box Partials and their configs in the October CMS Backend Editor.