Offering alternative editing options for something other than lists

serettig's picture
Forums: 

Hi,

I want content creators to be able to choose between two different ways of editing my content type. This is very similar to what QuestionSet offers:

  1. the content creator can type everything into a textbox following a certain pattern (quick, but requires knowledge of the markup)
  2. the content creator can use the UI to add entities (more cumbersome, but no knowledge necessary)

I've seen that the attribute widgets of the list type allows this behavior. You can simply specify a VerticalTabs widget and a custom one and the user can choose from tabs which one to use. But the problem in my case is that I want to allow switching views for groups, not for lists. According to the semantics documentation widgets is not implemented for the type group

Is there another way of achieving what I want to do except for implementing a fully custom editor that does the switching itself?

Thanks!
Sebastian

BV52's picture

Hi Sebastian,

Thank you for your post. I'm sorry for the delay in answering your question due to the holidays. We will get back to you as soon possible.

Happy New Year :-)

-BV52

thomasmars's picture

You can submit a pull request for the "group" semantics in H5P Core with a good explanation for the use of this feature.
Alternatively you can create a separate custom widget which has the same functionality as the "group" semantics, but in addition implements widgets logic. This is perhaps more convenient since you'll be able to use it right away without it having to get approved and integrated into Core first.

serettig's picture

Ok, thanks for your answer! It looks like adding this functionality to "group" would require changing the inheritence structure of group. I don't think it's a good idea to do this without a good overview of what this change could mean in other situations. So I don't think I'll be touching this. Reimplementing the group widget is also more than I want to do for my relatively simple content type, so I've pushed this to "low priority" in my todo list and will maybe revisit this if I have the time in the future.

thomasmars's picture

Yes, that's probably a reasonable decision for now. Hope you'll share your work when you're done, looking forward to see how your content type turns out :)