• Resolved lijitimit

    (@lijitimit)


    I have search on the h5p site and in here. The only place I can find the “slug” for an h5p exercise is in the database. Is there a way to find it on the WP dashboard or front end?

    BACKGROUND: I am using the same h5p on multiple sites, and find it tedious to manually upload an h5p and then have to change the wordpress post that was copied over to match the ID. It would be far simpler to use the slug across multiple sites as if the number of h5p modules is not exactly the same, the ID will either show a different exercise, or non at all.

    I have tried to set “insert H5p by slug” and installed the “classic editor” plugin so the h5p post button would show up, but it still inserts by ID. Version 1.15.0

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author thomasmars

    (@thomasmars)

    The slug is typically just a lowercase version of the title where spaces are replaced with dashes, e.g. Hello World becomes “hello-world”.

    You can see the exact slug by typing in the following in your developer tools console while viewing the H5P view:
    H5PIntegration.contents[‘cid-{contentId}’].exportUrl (your contentId will vary depending on the content, but you should be able to see this in the dev tools), which has a form like …/exports/{slug}-{uniqueId}.h5p, so you
    can extract the slug from this.
    Sorry, I don’t think there’s any easier ways to get it.

    Thread Starter lijitimit

    (@lijitimit)

    Thank you for the quick reply Thomas. That was very helpful! I actually had figured out that the slug could be gleaned from the title, the issue in our case was a staff member CHANGED the title, so we couldn’t figure out the slug ??

    Your solution worked. Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Finding the H5p slug’ is closed to new replies.