H5p content is not sticked to node, it would be easier for site builder if this is field.

Comments

falcon’s picture

Agreed! We'll do something about that, but we don't have an eta.

ydahi’s picture

A way around this is to use the entity reference module or the references module to link h5p nodes to nodes of a content type you create.

This is the current structure I'm experimenting with. For instance, users can create h5p nodes, and all of these nodes are listed in a "library".

Then, when the user wants to include one of the h5p nodes, say inside a book node, they create a book page with a entity reference to the h5p content.

hosais’s picture

https://www.drupal.org/project/paragraphs maybe a good option for you too. It is based on entity reference and provides more dynamic solution.

ydahi’s picture

Thanks for sharing that module @hosais, it looks promising!

dshields’s picture

This really will be a fantastic extension of this module.

kenianbei’s picture

Any news on this? I'm integrating this module with an existing ajax-oriented drupal install and it seems the best way forward for integration is to use the fields API with proper implementation of ajax behaviors, settings. Currently there is no way to create reusable instances if anything is loaded using Drupal's ajax api. This issue also seems relevant though the code needs reworked for the current version: https://www.drupal.org/node/2489018

tajakobsen’s picture

There will soon be a beta release of H5P for Drupal 8, where it will be represented as a Field in the editor.

kenianbei’s picture

Thanks for the fast reply... I forgot to mention this was for Drupal 7. Any chance of a backport?

My school has given me a chunk of time to integrate H5P with our services... I'm working right now on fixing the AJAX integration for h5p... but if there was interest I could also help with converting h5p to a field. Was there a reason not to move to using fields for Drupal 7 or was it just an issue of developer time?

icc’s picture

I don't think there was any particular reason for it not being converted into a field when going from D6 to D7, it probably had mostly to do with time and the need to just get it working in D7.

As mentioned, the D8 version will be using a field, backporting this to D7 will probably be time-consuming due to the large differences in the Field API. However, anyone who wishes to try is free to make an effort. Though, I think most devs will want to focus on D8 as it's more future oriented.

kenianbei’s picture

I've been able to get everything working without moving to fields for D7 so I don't think I'll be working on this. Not sure when we'll move to D8 but I hope there will be an upgrade path! Hopefully it will be as easy as moving the json_content over to the field in an update hook.