Skip to content

Instantly share code, notes, and snippets.

@bdunogier
Last active September 13, 2015 19:22
Show Gist options
  • Save bdunogier/34881f80acd4adaef7ac to your computer and use it in GitHub Desktop.
Save bdunogier/34881f80acd4adaef7ac to your computer and use it in GitHub Desktop.
eZ Platform features/extensions ideas

EmbedVideoFragment FieldType

A FieldType that:

  • stores a links to an embedded (youtube) video with maybe size and stuff
  • stores a list of user submitted "chapters" (e.g. named time references)

Example:

A Custom XmlText tag that generates a linked text to one of the chapters above (if there's a UI, chapters can be visually selected). Example with a "steps" embed video fragment field definition: "see the <ezcustom:EmbedVideoFragment ezcustom:fieldIdentifier="steps" ezcustom:chapter="intro">.

Clicking the links in the rendered text pops up (overlay, maybe partial to keep the text readable if applicable) the video at the right chapter, and ideally stops playing before the next one. With the example above, playback starts at 0 and stops at 60 (start and end parameters of the embed link).

Render locations/content as queries.

Q: With the current named_queries feature, is it possible to easily show the Children of an existing Container ? A: It would require an override of the location_view template... hence: no, it is not.

Use-case

Render the contents of any container using a custom Query, without writing any custom controller.

Config proposal

What would it take to make that both possible and easy ? Could we somehow configure that with an override rule ? It would be easier:

ezpublish:
  default:
    location_view:
      articles:
        match:
          ContentType\Identifier: folder
          Section\Identifier: news
        location_query:
          identifier: latest_articles
          parameters:
            # map parameters from the query_type to data from the rendered location/content/item
            location_id: location.id
            content: content

Would render Folders from the News Section using the location_query controller, with the latest_articles QueryType. The rendered folder's location.id would be passed to the query as the location_id parameter.

The rendered location would also be made available to the location_query template, as "location" maybe, or the content as "content".

@janit
Copy link

janit commented Aug 31, 2015

Sounds very good! People expect to have embedding capabilities similar to WordPress. I keep an account on wordpress.com, just so I know what the base line expectations for people using it for content entry. I would look at their interface for video embedding for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment