Hello everyone,
I'm currently working on my first ProcessWire project and read a lot in the forums lately. I also came across the following thread and thought about a way this could be neatly solved. However as I am new to Processwire I don't know if my proposed solution
a) makes sense at all
b) is possible to implement
c) is an improvement over what Processwire currently offers
Therefore I would like to discuss the idea a bit and get some honest feedback.
The Problem We have a group of input fields that belong to one part of a page. Those input fields should be visually connected so the user knows they are related to one another. Every page can (and probably will) have different values in those fields.
Example:
We have a couple of settings for a sidebar on a page.
show a sidebar on this page (checkbox)
sidebar title (text)
sidebar subtitle (text)
some other options (for example what content should be shown) (select or checkbox)
The way to achieve that now The way I see it (again, I'm new to Processwire and so sorry if I missed another option) the way to do something like that is to use a fieldset_open fieldtype or fieldset_tab_open. However that feels a bit cumbersome, at least for me. You have to choose where the fieldset should start, where it ends, don't really see it when you're adding new fields, etc. It just didn't feel as elegant as the rest of Processwire.
The proposed improvement [updated] Now what I was thinking is if there could be something like a FieldtypeTemplate FieldtypeGroup. For our sidebar problem our workflow would then become:
we create the fields we want to use, but do not assign them to a template
next we create a field "sidebar" of our new FieldtypeGroup, select the fields we created and add that field to our page template.
That way we could later simply add more sidebar related fields to our sidebar field and automatically all templates using the sidebar field would have the new option.
The workflow is really similar to what the repeater fields currently does, just without the actual repeating part.
Now I'd like to know, does the idea make sense and would it be possible to achieve with Processwires architecture?
Thank you for reading through
Alex